OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.metadata.MetaConnect Class Reference
+ Collaboration diagram for com.mapd.metadata.MetaConnect:

Public Member Functions

 MetaConnect (int dbPort, String dataDir, HeavyDBUser currentHeavyDBUser, HeavyDBParser parser, SockTransportProperties skT, String db)
 
 MetaConnect (int dbPort, String dataDir, HeavyDBUser currentHeavyDBUser, HeavyDBParser parser, SockTransportProperties skT)
 
List< String > getDatabases ()
 
Table getTable (String tableName)
 
Set< String > getTables ()
 
TTableDetails get_table_details (String tableName)
 
void updateMetaData (String schema, String table)
 

Static Public Member Functions

static final int get_physical_cols (int type)
 
static final boolean is_geometry (int type)
 

Static Package Attributes

static final Logger HEAVYDBLOGGER = LoggerFactory.getLogger(MetaConnect.class)
 

Private Member Functions

void connectToCatalog (String catalog)
 
void disconnectFromCatalog ()
 
void connectToDBCatalog ()
 
Set< String > getTables_SQL ()
 
TTableDetails get_table_detail_SQL (String tableName)
 
TTableDetails get_table_detail_JSON (String tableName) throws IOException, RuntimeException
 
int getTableId (String tableName)
 
boolean isView (String tableName)
 
String getViewSql (String tableName)
 
String getViewSqlViaSql (int tableId)
 
TDatumType typeToThrift (int type)
 
TEncodingType encodingToThrift (int comp)
 
void populateDatabases ()
 
Set< String > getDatabases_SQL ()
 

Private Attributes

final String dataDir
 
final String default_db
 
final HeavyDBUser currentUser
 
final int dbPort
 
Connection catConn
 
final HeavyDBParser parser
 
final SockTransportProperties sock_transport_properties
 

Static Private Attributes

static final int KBOOLEAN = 1
 
static final int KCHAR = 2
 
static final int KVARCHAR = 3
 
static final int KNUMERIC = 4
 
static final int KDECIMAL = 5
 
static final int KINT = 6
 
static final int KSMALLINT = 7
 
static final int KFLOAT = 8
 
static final int KDOUBLE = 9
 
static final int KTIME = 10
 
static final int KTIMESTAMP = 11
 
static final int KBIGINT = 12
 
static final int KTEXT = 13
 
static final int KDATE = 14
 
static final int KARRAY = 15
 
static final int KINTERVAL_DAY_TIME = 16
 
static final int KINTERVAL_YEAR_MONTH = 17
 
static final int KPOINT = 18
 
static final int KLINESTRING = 19
 
static final int KPOLYGON = 20
 
static final int KMULTIPOLYGON = 21
 
static final int KTINYINT = 22
 
static final int KMULTILINESTRING = 30
 
static final int KMULTIPOINT = 31
 
static final String CATALOG_DIR_NAME = "catalogs"
 
static volatile Map< String,
Set< String > > 
DATABASE_TO_TABLES
 
static volatile Map< List
< String >, Table > 
DB_TABLE_DETAILS
 

Detailed Description

Definition at line 66 of file MetaConnect.java.

Constructor & Destructor Documentation

com.mapd.metadata.MetaConnect.MetaConnect ( int  dbPort,
String  dataDir,
HeavyDBUser  currentHeavyDBUser,
HeavyDBParser  parser,
SockTransportProperties  skT,
String  db 
)
inline

Definition at line 107 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.currentUser, com.mapd.metadata.MetaConnect.DATABASE_TO_TABLES, com.mapd.metadata.MetaConnect.dataDir, com.mapd.metadata.MetaConnect.dbPort, com.mapd.metadata.MetaConnect.parser, and com.mapd.metadata.MetaConnect.populateDatabases().

112  {
113  this.dataDir = dataDir;
114  if (db != null) {
115  this.default_db = db;
116  } else {
117  if (currentHeavyDBUser != null) {
118  this.default_db = currentHeavyDBUser.getDB();
119  } else {
120  this.default_db = null;
121  }
122  }
123  this.currentUser = currentHeavyDBUser;
124  this.dbPort = dbPort;
125  this.parser = parser;
126  this.sock_transport_properties = skT;
127 
128  // check to see if we have a populated DATABASE_TO_TABLES structure
129  // first time in we need to make sure this gets populated
130  // It is OK to use a MetaConnect without a user
131  // but it should not attempt to populate the DB
132  if (currentUser != null && DATABASE_TO_TABLES.size() == 0) {
133  // get all databases
135  }
136  }
static volatile Map< String, Set< String > > DATABASE_TO_TABLES
final HeavyDBUser currentUser
final HeavyDBParser parser

+ Here is the call graph for this function:

com.mapd.metadata.MetaConnect.MetaConnect ( int  dbPort,
String  dataDir,
HeavyDBUser  currentHeavyDBUser,
HeavyDBParser  parser,
SockTransportProperties  skT 
)
inline

Definition at line 138 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.dataDir, com.mapd.metadata.MetaConnect.dbPort, and com.mapd.metadata.MetaConnect.parser.

142  {
143  this(dbPort, dataDir, currentHeavyDBUser, parser, skT, null);
144  }
final HeavyDBParser parser

Member Function Documentation

void com.mapd.metadata.MetaConnect.connectToCatalog ( String  catalog)
inlineprivate

Definition at line 154 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.CATALOG_DIR_NAME, com.mapd.metadata.MetaConnect.catConn, and com.mapd.metadata.MetaConnect.dataDir.

Referenced by com.mapd.metadata.MetaConnect.connectToDBCatalog(), and com.mapd.metadata.MetaConnect.populateDatabases().

154  {
155  try {
156  // try {
157  Class.forName("org.sqlite.JDBC");
158  } catch (ClassNotFoundException ex) {
159  String err = "Could not find class for metadata connection; DB: '" + catalog
160  + "' data dir '" + dataDir + "', error was " + ex.getMessage();
161  HEAVYDBLOGGER.error(err);
162  throw new RuntimeException(err);
163  }
164  String connectURL = "jdbc:sqlite:" + dataDir + "/" + CATALOG_DIR_NAME + "/" + catalog;
165  try {
166  catConn = DriverManager.getConnection(connectURL);
167  } catch (SQLException ex) {
168  String err = "Could not establish a connection for metadata; DB: '" + catalog
169  + "' data dir '" + dataDir + "', error was " + ex.getMessage();
170  HEAVYDBLOGGER.error(err);
171  throw new RuntimeException(err);
172  }
173  HEAVYDBLOGGER.debug("Opened database successfully");
174  }
static final String CATALOG_DIR_NAME

+ Here is the caller graph for this function:

void com.mapd.metadata.MetaConnect.connectToDBCatalog ( )
inlineprivate

Definition at line 187 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.connectToCatalog(), and com.mapd.metadata.MetaConnect.default_db.

Referenced by com.mapd.metadata.MetaConnect.get_table_details(), com.mapd.metadata.MetaConnect.getTables(), com.mapd.metadata.MetaConnect.getTables_SQL(), and com.mapd.metadata.MetaConnect.getViewSql().

187  {
189  }
void connectToCatalog(String catalog)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void com.mapd.metadata.MetaConnect.disconnectFromCatalog ( )
inlineprivate

Definition at line 176 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.dataDir.

Referenced by com.mapd.metadata.MetaConnect.get_table_details(), com.mapd.metadata.MetaConnect.getTables(), com.mapd.metadata.MetaConnect.getTables_SQL(), com.mapd.metadata.MetaConnect.getViewSql(), and com.mapd.metadata.MetaConnect.populateDatabases().

176  {
177  try {
178  catConn.close();
179  } catch (SQLException ex) {
180  String err = "Could not disconnect from metadata "
181  + " data dir '" + dataDir + "', error was " + ex.getMessage();
182  HEAVYDBLOGGER.error(err);
183  throw new RuntimeException(err);
184  }
185  }

+ Here is the caller graph for this function:

TEncodingType com.mapd.metadata.MetaConnect.encodingToThrift ( int  comp)
inlineprivate

Definition at line 808 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.get_table_detail_JSON(), and com.mapd.metadata.MetaConnect.get_table_detail_SQL().

808  {
809  switch (comp) {
810  case 0:
811  return TEncodingType.NONE;
812  case 1:
813  return TEncodingType.FIXED;
814  case 2:
815  return TEncodingType.RL;
816  case 3:
817  return TEncodingType.DIFF;
818  case 4:
819  return TEncodingType.DICT;
820  case 5:
821  return TEncodingType.SPARSE;
822  case 6:
823  return TEncodingType.GEOINT;
824  case 7:
825  return TEncodingType.DATE_IN_DAYS;
826  default:
827  return null;
828  }
829  }

+ Here is the caller graph for this function:

static final int com.mapd.metadata.MetaConnect.get_physical_cols ( int  type)
inlinestatic

Definition at line 370 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.KLINESTRING, com.mapd.metadata.MetaConnect.KMULTILINESTRING, com.mapd.metadata.MetaConnect.KMULTIPOINT, com.mapd.metadata.MetaConnect.KMULTIPOLYGON, com.mapd.metadata.MetaConnect.KPOINT, and com.mapd.metadata.MetaConnect.KPOLYGON.

Referenced by com.mapd.metadata.MetaConnect.get_table_detail_JSON(), and com.mapd.metadata.MetaConnect.get_table_detail_SQL().

370  {
371  switch (type) {
372  case KPOINT:
373  return 1; // coords
374  case KMULTIPOINT:
375  case KLINESTRING:
376  return 2; // coords, bounds
377  case KMULTILINESTRING:
378  return 3; // coords, linestring_sizes, bounds
379  case KPOLYGON:
380  return 4; // coords, ring_sizes, bounds, render_group
381  case KMULTIPOLYGON:
382  return 5; // coords, ring_sizes, poly_rings, bounds, render_group
383  default:
384  break;
385  }
386  return 0;
387  }
static final int KMULTIPOLYGON
static final int KMULTIPOINT
static final int KMULTILINESTRING
static final int KLINESTRING

+ Here is the caller graph for this function:

TTableDetails com.mapd.metadata.MetaConnect.get_table_detail_JSON ( String  tableName) throws IOException, RuntimeException
inlineprivate

Definition at line 507 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.CATALOG_DIR_NAME, com.mapd.metadata.MetaConnect.dataDir, com.mapd.metadata.MetaConnect.default_db, com.mapd.metadata.MetaConnect.encodingToThrift(), com.mapd.metadata.MetaConnect.get_physical_cols(), com.mapd.metadata.MetaConnect.is_geometry(), com.mapd.metadata.MetaConnect.KARRAY, and com.mapd.metadata.MetaConnect.typeToThrift().

Referenced by com.mapd.metadata.MetaConnect.get_table_detail_SQL().

508  {
509  TTableDetails td = new TTableDetails();
510  td.getRow_descIterator();
511 
512  // open table json file
513  final String filePath =
514  dataDir + "/" + CATALOG_DIR_NAME + "/" + default_db + "_temp_tables.json";
515  HEAVYDBLOGGER.debug("Opening temp table file at " + filePath);
516 
517  String tempTablesJsonStr;
518  try {
519  File tempTablesFile = new File(filePath);
520  FileInputStream tempTablesStream = new FileInputStream(tempTablesFile);
521  byte[] data = new byte[(int) tempTablesFile.length()];
522  tempTablesStream.read(data);
523  tempTablesStream.close();
524 
525  tempTablesJsonStr = new String(data, "UTF-8");
526  } catch (java.io.FileNotFoundException e) {
527  throw new RuntimeException("Failed to read temporary tables file.");
528  }
529 
530  Gson gson = new Gson();
531  JsonObject fileParentObject = gson.fromJson(tempTablesJsonStr, JsonObject.class);
532  if (fileParentObject == null) {
533  throw new IOException("Malformed temporary tables file.");
534  }
535 
536  JsonObject tableObject = fileParentObject.getAsJsonObject(tableName);
537  if (tableObject == null) {
538  throw new RuntimeException(
539  "Failed to find table " + tableName + " in temporary tables file.");
540  }
541 
542  String jsonTableName = tableObject.get("name").getAsString();
543  assert (tableName == jsonTableName);
544  int id = tableObject.get("id").getAsInt();
545  HEAVYDBLOGGER.debug("table id is " + id);
546  HEAVYDBLOGGER.debug("table name is " + tableName);
547 
548  JsonArray jsonColumns = tableObject.getAsJsonArray("columns");
549  assert (jsonColumns != null);
550 
551  int skip_physical_cols = 0;
552  for (JsonElement columnElement : jsonColumns) {
553  JsonObject columnObject = columnElement.getAsJsonObject();
554 
555  String colName = columnObject.get("name").getAsString();
556  HEAVYDBLOGGER.debug("name = " + colName);
557  int colType = columnObject.get("coltype").getAsInt();
558  HEAVYDBLOGGER.debug("coltype = " + colType);
559  int colSubType = columnObject.get("colsubtype").getAsInt();
560  HEAVYDBLOGGER.debug("colsubtype = " + colSubType);
561  int compression = columnObject.get("compression").getAsInt();
562  HEAVYDBLOGGER.debug("compression = " + compression);
563  int compression_param = columnObject.get("comp_param").getAsInt();
564  HEAVYDBLOGGER.debug("comp_param = " + compression_param);
565  int size = columnObject.get("size").getAsInt();
566  HEAVYDBLOGGER.debug("size = " + size);
567  int colDim = columnObject.get("coldim").getAsInt();
568  HEAVYDBLOGGER.debug("coldim = " + colDim);
569  int colScale = columnObject.get("colscale").getAsInt();
570  HEAVYDBLOGGER.debug("colscale = " + colScale);
571  boolean isNotNull = columnObject.get("is_notnull").getAsBoolean();
572  HEAVYDBLOGGER.debug("is_notnull = " + isNotNull);
573  boolean isSystemCol = columnObject.get("is_systemcol").getAsBoolean();
574  HEAVYDBLOGGER.debug("is_systemcol = " + isSystemCol);
575  boolean isVirtualCol = columnObject.get("is_virtualcol").getAsBoolean();
576  HEAVYDBLOGGER.debug("is_vitrualcol = " + isVirtualCol);
577  boolean isDeletedCol = columnObject.get("is_deletedcol").getAsBoolean();
578  HEAVYDBLOGGER.debug("is_deletedcol = " + isDeletedCol);
579  HEAVYDBLOGGER.debug("");
580 
581  if (isDeletedCol) {
582  HEAVYDBLOGGER.debug("Skipping delete column.");
583  continue;
584  }
585 
586  TColumnType tct = new TColumnType();
587  TTypeInfo tti = new TTypeInfo();
588  TDatumType tdt;
589 
590  if (colType == KARRAY) {
591  tti.is_array = true;
592  tdt = typeToThrift(colSubType);
593  } else {
594  tti.is_array = false;
595  tdt = typeToThrift(colType);
596  }
597 
598  tti.nullable = !isNotNull;
599  tti.encoding = encodingToThrift(compression);
600  tti.comp_param = compression_param;
601  tti.size = size;
602  tti.type = tdt;
603  tti.scale = colScale;
604  tti.precision = colDim;
605 
606  tct.col_name = colName;
607  tct.col_type = tti;
608  tct.is_system = isSystemCol;
609 
610  if (skip_physical_cols <= 0) skip_physical_cols = get_physical_cols(colType);
611  if (is_geometry(colType) || skip_physical_cols-- <= 0) td.addToRow_desc(tct);
612  }
613 
614  return td;
615  }
static final int get_physical_cols(int type)
static final boolean is_geometry(int type)
static final String CATALOG_DIR_NAME
TDatumType typeToThrift(int type)
TEncodingType encodingToThrift(int comp)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TTableDetails com.mapd.metadata.MetaConnect.get_table_detail_SQL ( String  tableName)
inlineprivate

Definition at line 394 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.default_db, com.mapd.metadata.MetaConnect.encodingToThrift(), com.mapd.metadata.MetaConnect.get_physical_cols(), com.mapd.metadata.MetaConnect.get_table_detail_JSON(), com.mapd.metadata.MetaConnect.getTableId(), com.mapd.metadata.MetaConnect.getViewSqlViaSql(), com.mapd.metadata.MetaConnect.is_geometry(), com.mapd.metadata.MetaConnect.isView(), com.mapd.metadata.MetaConnect.KARRAY, and com.mapd.metadata.MetaConnect.typeToThrift().

Referenced by com.mapd.metadata.MetaConnect.get_table_details().

394  {
395  TTableDetails td = new TTableDetails();
396  td.getRow_descIterator();
397  int id = getTableId(tableName);
398  if (id == -1) {
399  try {
400  // need to mark it as temporary table
401  TTableDetails tempTableTd = get_table_detail_JSON(tableName);
402  tempTableTd.is_temporary = true;
403  return tempTableTd;
404  } catch (Exception e) {
405  String err =
406  "Table '" + tableName + "' does not exist for DB '" + default_db + "'";
407  HEAVYDBLOGGER.error(err);
408  throw new RuntimeException(err);
409  }
410  }
411 
412  // read data from table
413  Statement stmt = null;
414  ResultSet rs = null;
415  try {
416  stmt = catConn.createStatement();
417  HEAVYDBLOGGER.debug("table id is " + id);
418  HEAVYDBLOGGER.debug("table name is " + tableName);
419  String query = String.format(
420  "SELECT * FROM mapd_columns where tableid = %d and not is_deletedcol order by columnid;",
421  id);
422  HEAVYDBLOGGER.debug(query);
423  rs = stmt.executeQuery(query);
424  int skip_physical_cols = 0;
425  while (rs.next()) {
426  String colName = rs.getString("name");
427  HEAVYDBLOGGER.debug("name = " + colName);
428  int colType = rs.getInt("coltype");
429  HEAVYDBLOGGER.debug("coltype = " + colType);
430  int colSubType = rs.getInt("colsubtype");
431  HEAVYDBLOGGER.debug("colsubtype = " + colSubType);
432  int compression = rs.getInt("compression");
433  HEAVYDBLOGGER.debug("compression = " + compression);
434  int compression_param = rs.getInt("comp_param");
435  HEAVYDBLOGGER.debug("comp_param = " + compression_param);
436  int size = rs.getInt("size");
437  HEAVYDBLOGGER.debug("size = " + size);
438  int colDim = rs.getInt("coldim");
439  HEAVYDBLOGGER.debug("coldim = " + colDim);
440  int colScale = rs.getInt("colscale");
441  HEAVYDBLOGGER.debug("colscale = " + colScale);
442  boolean isNotNull = rs.getBoolean("is_notnull");
443  HEAVYDBLOGGER.debug("is_notnull = " + isNotNull);
444  boolean isSystemCol = rs.getBoolean("is_systemcol");
445  HEAVYDBLOGGER.debug("is_systemcol = " + isSystemCol);
446  boolean isVirtualCol = rs.getBoolean("is_virtualcol");
447  HEAVYDBLOGGER.debug("is_vitrualcol = " + isVirtualCol);
448  HEAVYDBLOGGER.debug("");
449  TColumnType tct = new TColumnType();
450  TTypeInfo tti = new TTypeInfo();
451  TDatumType tdt;
452 
453  if (colType == KARRAY) {
454  tti.is_array = true;
455  tdt = typeToThrift(colSubType);
456  } else {
457  tti.is_array = false;
458  tdt = typeToThrift(colType);
459  }
460 
461  tti.nullable = !isNotNull;
462  tti.encoding = encodingToThrift(compression);
463  tti.comp_param = compression_param;
464  tti.size = size;
465  tti.type = tdt;
466  tti.scale = colScale;
467  tti.precision = colDim;
468 
469  tct.col_name = colName;
470  tct.col_type = tti;
471  tct.is_system = isSystemCol;
472 
473  if (skip_physical_cols <= 0) skip_physical_cols = get_physical_cols(colType);
474  if (is_geometry(colType) || skip_physical_cols-- <= 0) td.addToRow_desc(tct);
475  }
476  } catch (Exception e) {
477  String err = "error trying to read from mapd_columns, error was " + e.getMessage();
478  HEAVYDBLOGGER.error(err);
479  throw new RuntimeException(err);
480  } finally {
481  if (rs != null) {
482  try {
483  rs.close();
484  } catch (SQLException ex) {
485  String err = "Could not close resultset, error was " + ex.getMessage();
486  HEAVYDBLOGGER.error(err);
487  throw new RuntimeException(err);
488  }
489  }
490  if (stmt != null) {
491  try {
492  stmt.close();
493  } catch (SQLException ex) {
494  String err = "Could not close stmt, error was " + ex.getMessage();
495  HEAVYDBLOGGER.error(err);
496  throw new RuntimeException(err);
497  }
498  }
499  }
500  if (isView(tableName)) {
501  td.setView_sqlIsSet(true);
502  td.setView_sql(getViewSqlViaSql(id));
503  }
504  return td;
505  }
static final int get_physical_cols(int type)
static final boolean is_geometry(int type)
String getViewSqlViaSql(int tableId)
TDatumType typeToThrift(int type)
int getTableId(String tableName)
TTableDetails get_table_detail_JSON(String tableName)
boolean isView(String tableName)
TEncodingType encodingToThrift(int comp)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TTableDetails com.mapd.metadata.MetaConnect.get_table_details ( String  tableName)
inline

Definition at line 335 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.connectToDBCatalog(), com.mapd.metadata.MetaConnect.dbPort, com.mapd.metadata.MetaConnect.default_db, com.mapd.metadata.MetaConnect.disconnectFromCatalog(), and com.mapd.metadata.MetaConnect.get_table_detail_SQL().

Referenced by com.mapd.metadata.MetaConnect.getTable().

335  {
336  if (dbPort == -1) {
337  // use sql
339  TTableDetails td = get_table_detail_SQL(tableName);
341  return td;
342  }
343  try {
344  // use thrift direct to local server
345  TProtocol protocol = null;
346 
347  TTransport transport =
348  sock_transport_properties.openClientTransport("localhost", dbPort);
349  if (!transport.isOpen()) transport.open();
350  protocol = new TBinaryProtocol(transport);
351 
352  Heavy.Client client = new Heavy.Client(protocol);
353  TTableDetails td = client.get_internal_table_details_for_database(
354  currentUser.getSession(), tableName, default_db);
355  transport.close();
356 
357  return td;
358  } catch (TTransportException ex) {
359  HEAVYDBLOGGER.error(ex.toString());
360  throw new RuntimeException(ex.toString());
361  } catch (TDBException ex) {
362  HEAVYDBLOGGER.error(ex.getError_msg());
363  throw new RuntimeException(ex.getError_msg());
364  } catch (TException ex) {
365  HEAVYDBLOGGER.error(ex.toString());
366  throw new RuntimeException(ex.toString());
367  }
368  }
TTableDetails get_table_detail_SQL(String tableName)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

List<String> com.mapd.metadata.MetaConnect.getDatabases ( )
inline

Definition at line 146 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.DATABASE_TO_TABLES.

146  {
147  List<String> dbList = new ArrayList<String>(DATABASE_TO_TABLES.size());
148  for (String db : DATABASE_TO_TABLES.keySet()) {
149  dbList.add(db);
150  }
151  return dbList;
152  }
static volatile Map< String, Set< String > > DATABASE_TO_TABLES
Set<String> com.mapd.metadata.MetaConnect.getDatabases_SQL ( )
inlineprivate

Definition at line 884 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.populateDatabases().

884  {
885  Set<String> dbSet = new HashSet<String>();
886  Statement stmt = null;
887  ResultSet rs = null;
888  String sqlText = "";
889  try {
890  stmt = catConn.createStatement();
891 
892  // get the tables
893  rs = stmt.executeQuery("SELECT name FROM mapd_databases ");
894  while (rs.next()) {
895  dbSet.add(rs.getString("name"));
896  /*--*/
897  HEAVYDBLOGGER.debug("Object name = " + rs.getString("name"));
898  }
899  rs.close();
900  stmt.close();
901 
902  } catch (Exception e) {
903  String err = "error trying to get all the databases, error was " + e.getMessage();
904  HEAVYDBLOGGER.error(err);
905  throw new RuntimeException(err);
906  }
907  return dbSet;
908  }

+ Here is the caller graph for this function:

Table com.mapd.metadata.MetaConnect.getTable ( String  tableName)
inline

Definition at line 191 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.default_db, com.mapd.metadata.MetaConnect.get_table_details(), com.mapd.metadata.MetaConnect.getViewSql(), and com.mapd.metadata.MetaConnect.parser.

191  {
192  List<String> dbTable =
193  ImmutableList.of(default_db.toUpperCase(), tableName.toUpperCase());
194  Table cTable = DB_TABLE_DETAILS.get(dbTable);
195  if (cTable != null) {
196  HEAVYDBLOGGER.debug("Metaconnect DB " + default_db + " get table " + tableName
197  + " details " + cTable);
198  return cTable;
199  }
200 
201  TTableDetails td = get_table_details(tableName);
202 
203  if (td.getView_sql() == null || td.getView_sql().isEmpty()) {
204  HEAVYDBLOGGER.debug("Processing a table");
205  Table rTable = new HeavyDBTable(td);
206  DB_TABLE_DETAILS.putIfAbsent(dbTable, rTable);
207  HEAVYDBLOGGER.debug("Metaconnect DB " + default_db + " get table " + tableName
208  + " details " + rTable + " Not in buffer");
209  return rTable;
210  } else {
211  HEAVYDBLOGGER.debug("Processing a view");
212  Table rTable = new HeavyDBView(getViewSql(tableName), td, parser);
213  DB_TABLE_DETAILS.putIfAbsent(dbTable, rTable);
214  HEAVYDBLOGGER.debug("Metaconnect DB " + default_db + " get view " + tableName
215  + " details " + rTable + " Not in buffer");
216  return rTable;
217  }
218  }
String getViewSql(String tableName)
TTableDetails get_table_details(String tableName)
final HeavyDBParser parser

+ Here is the call graph for this function:

int com.mapd.metadata.MetaConnect.getTableId ( String  tableName)
inlineprivate

Definition at line 617 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.dataDir, and com.mapd.metadata.MetaConnect.default_db.

Referenced by com.mapd.metadata.MetaConnect.get_table_detail_SQL(), and com.mapd.metadata.MetaConnect.getViewSql().

617  {
618  Statement stmt = null;
619  ResultSet rs = null;
620  int tableId = -1;
621  try {
622  stmt = catConn.createStatement();
623  rs = stmt.executeQuery(String.format(
624  "SELECT tableid FROM mapd_tables where name = '%s' COLLATE NOCASE;",
625  tableName));
626  while (rs.next()) {
627  tableId = rs.getInt("tableid");
628  HEAVYDBLOGGER.debug("tableId = " + tableId);
629  HEAVYDBLOGGER.debug("");
630  }
631  rs.close();
632  stmt.close();
633  } catch (Exception e) {
634  String err = "Error trying to read from metadata table mapd_tables;DB: "
635  + default_db + " data dir " + dataDir + ", error was " + e.getMessage();
636  HEAVYDBLOGGER.error(err);
637  throw new RuntimeException(err);
638  } finally {
639  if (rs != null) {
640  try {
641  rs.close();
642  } catch (SQLException ex) {
643  String err = "Could not close resultset, error was " + ex.getMessage();
644  HEAVYDBLOGGER.error(err);
645  throw new RuntimeException(err);
646  }
647  }
648  if (stmt != null) {
649  try {
650  stmt.close();
651  } catch (SQLException ex) {
652  String err = "Could not close stmt, error was " + ex.getMessage();
653  HEAVYDBLOGGER.error(err);
654  throw new RuntimeException(err);
655  }
656  }
657  }
658  return (tableId);
659  }

+ Here is the caller graph for this function:

Set<String> com.mapd.metadata.MetaConnect.getTables ( )
inline

Definition at line 220 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.connectToDBCatalog(), com.mapd.metadata.MetaConnect.dbPort, com.mapd.metadata.MetaConnect.default_db, com.mapd.metadata.MetaConnect.disconnectFromCatalog(), and com.mapd.metadata.MetaConnect.getTables_SQL().

220  {
221  Set<String> mSet = DATABASE_TO_TABLES.get(default_db.toUpperCase());
222  if (mSet != null && mSet.size() > 0) {
223  HEAVYDBLOGGER.debug("Metaconnect DB getTables " + default_db + " tables " + mSet);
224  return mSet;
225  }
226 
227  if (dbPort == -1) {
228  // use sql
230  Set<String> ts = getTables_SQL();
232  DATABASE_TO_TABLES.put(default_db.toUpperCase(), ts);
233  HEAVYDBLOGGER.debug(
234  "Metaconnect DB getTables " + default_db + " tables " + ts + " from catDB");
235  return ts;
236  }
237  // use thrift direct to local server
238  try {
239  TProtocol protocol = null;
240  TTransport transport =
241  sock_transport_properties.openClientTransport("localhost", dbPort);
242  if (!transport.isOpen()) transport.open();
243  protocol = new TBinaryProtocol(transport);
244 
245  Heavy.Client client = new Heavy.Client(protocol);
246  List<String> tablesList =
247  client.get_tables_for_database(currentUser.getSession(), default_db);
248  Set<String> ts = new HashSet<String>(tablesList.size());
249  for (String tableName : tablesList) {
250  ts.add(tableName);
251  }
252 
253  transport.close();
254  DATABASE_TO_TABLES.put(default_db.toUpperCase(), ts);
255  HEAVYDBLOGGER.debug("Metaconnect DB getTables " + default_db + " tables " + ts
256  + " from server");
257  return ts;
258 
259  } catch (TTransportException ex) {
260  HEAVYDBLOGGER.error("TTransportException on port [" + dbPort + "]");
261  HEAVYDBLOGGER.error(ex.toString());
262  throw new RuntimeException(ex.toString());
263  } catch (TDBException ex) {
264  HEAVYDBLOGGER.error(ex.getError_msg());
265  throw new RuntimeException(ex.getError_msg());
266  } catch (TException ex) {
267  HEAVYDBLOGGER.error(ex.toString());
268  throw new RuntimeException(ex.toString());
269  }
270  }

+ Here is the call graph for this function:

Set<String> com.mapd.metadata.MetaConnect.getTables_SQL ( )
inlineprivate

Definition at line 272 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.CATALOG_DIR_NAME, com.mapd.metadata.MetaConnect.connectToDBCatalog(), com.mapd.metadata.MetaConnect.dataDir, com.mapd.metadata.MetaConnect.default_db, and com.mapd.metadata.MetaConnect.disconnectFromCatalog().

Referenced by com.mapd.metadata.MetaConnect.getTables().

272  {
274  Set<String> tableSet = new HashSet<String>();
275  Statement stmt = null;
276  ResultSet rs = null;
277  String sqlText = "";
278  try {
279  stmt = catConn.createStatement();
280 
281  // get the tables
282  rs = stmt.executeQuery("SELECT name FROM mapd_tables ");
283  while (rs.next()) {
284  tableSet.add(rs.getString("name"));
285  /*--*/
286  HEAVYDBLOGGER.debug("Object name = " + rs.getString("name"));
287  }
288  rs.close();
289  stmt.close();
290 
291  } catch (Exception e) {
292  String err = "error trying to get all the tables, error was " + e.getMessage();
293  HEAVYDBLOGGER.error(err);
294  throw new RuntimeException(err);
295  }
297 
298  try {
299  // open temp table json file
300  final String filePath =
301  dataDir + "/" + CATALOG_DIR_NAME + "/" + default_db + "_temp_tables.json";
302  HEAVYDBLOGGER.debug("Opening temp table file at " + filePath);
303  String tempTablesJsonStr;
304  try {
305  File tempTablesFile = new File(filePath);
306  FileInputStream tempTablesStream = new FileInputStream(tempTablesFile);
307  byte[] data = new byte[(int) tempTablesFile.length()];
308  tempTablesStream.read(data);
309  tempTablesStream.close();
310 
311  tempTablesJsonStr = new String(data, "UTF-8");
312  } catch (java.io.FileNotFoundException e) {
313  return tableSet;
314  }
315 
316  Gson gson = new Gson();
317  JsonObject fileParentObject = gson.fromJson(tempTablesJsonStr, JsonObject.class);
318  for (Entry<String, JsonElement> member : fileParentObject.entrySet()) {
319  String tableName = member.getKey();
320  tableSet.add(tableName);
321  /*--*/
322  HEAVYDBLOGGER.debug("Temp table object name = " + tableName);
323  }
324 
325  } catch (Exception e) {
326  String err = "error trying to load temporary tables from json file, error was "
327  + e.getMessage();
328  HEAVYDBLOGGER.error(err);
329  throw new RuntimeException(err);
330  }
331 
332  return tableSet;
333  }
static final String CATALOG_DIR_NAME

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

String com.mapd.metadata.MetaConnect.getViewSql ( String  tableName)
inlineprivate

Definition at line 685 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.connectToDBCatalog(), com.mapd.metadata.MetaConnect.dbPort, com.mapd.metadata.MetaConnect.default_db, com.mapd.metadata.MetaConnect.disconnectFromCatalog(), com.mapd.metadata.MetaConnect.getTableId(), and com.mapd.metadata.MetaConnect.getViewSqlViaSql().

Referenced by com.mapd.metadata.MetaConnect.getTable().

685  {
686  String sqlText;
687  if (dbPort == -1) {
688  // use sql
690  sqlText = getViewSqlViaSql(getTableId(tableName));
692  } else {
693  // use thrift direct to local server
694  try {
695  TProtocol protocol = null;
696 
697  TTransport transport =
698  sock_transport_properties.openClientTransport("localhost", dbPort);
699  if (!transport.isOpen()) transport.open();
700  protocol = new TBinaryProtocol(transport);
701 
702  Heavy.Client client = new Heavy.Client(protocol);
703  TTableDetails td = client.get_table_details_for_database(
704  currentUser.getSession(), tableName, default_db);
705  transport.close();
706 
707  sqlText = td.getView_sql();
708 
709  } catch (TTransportException ex) {
710  HEAVYDBLOGGER.error(ex.toString());
711  throw new RuntimeException(ex.toString());
712  } catch (TDBException ex) {
713  HEAVYDBLOGGER.error(ex.getError_msg());
714  throw new RuntimeException(ex.getError_msg());
715  } catch (TException ex) {
716  HEAVYDBLOGGER.error(ex.toString());
717  throw new RuntimeException(ex.toString());
718  }
719  }
720  /* return string without the sqlite's trailing semicolon */
721  if (sqlText.charAt(sqlText.length() - 1) == ';') {
722  return (sqlText.substring(0, sqlText.length() - 1));
723  } else {
724  return (sqlText);
725  }
726  }
String getViewSqlViaSql(int tableId)
int getTableId(String tableName)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

String com.mapd.metadata.MetaConnect.getViewSqlViaSql ( int  tableId)
inlineprivate

Definition at line 729 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.get_table_detail_SQL(), and com.mapd.metadata.MetaConnect.getViewSql().

729  {
730  Statement stmt;
731  ResultSet rs;
732  String sqlText = "";
733  try {
734  stmt = catConn.createStatement();
735  rs = stmt.executeQuery(String.format(
736  "SELECT sql FROM mapd_views where tableid = '%s' COLLATE NOCASE;",
737  tableId));
738  while (rs.next()) {
739  sqlText = rs.getString("sql");
740  HEAVYDBLOGGER.debug("View definition = " + sqlText);
741  HEAVYDBLOGGER.debug("");
742  }
743  rs.close();
744  stmt.close();
745  } catch (Exception e) {
746  String err = "error trying to read from mapd_views, error was " + e.getMessage();
747  HEAVYDBLOGGER.error(err);
748  throw new RuntimeException(err);
749  }
750  if (sqlText == null || sqlText.length() == 0) {
751  String err = "No view text found";
752  HEAVYDBLOGGER.error(err);
753  throw new RuntimeException(err);
754  }
755  return sqlText;
756  }

+ Here is the caller graph for this function:

static final boolean com.mapd.metadata.MetaConnect.is_geometry ( int  type)
inlinestatic
boolean com.mapd.metadata.MetaConnect.isView ( String  tableName)
inlineprivate

Definition at line 661 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.get_table_detail_SQL().

661  {
662  Statement stmt;
663  ResultSet rs;
664  int viewFlag = 0;
665  try {
666  stmt = catConn.createStatement();
667  rs = stmt.executeQuery(String.format(
668  "SELECT isview FROM mapd_tables where name = '%s' COLLATE NOCASE;",
669  tableName));
670  while (rs.next()) {
671  viewFlag = rs.getInt("isview");
672  HEAVYDBLOGGER.debug("viewFlag = " + viewFlag);
673  HEAVYDBLOGGER.debug("");
674  }
675  rs.close();
676  stmt.close();
677  } catch (Exception e) {
678  String err = "error trying to read from mapd_views, error was " + e.getMessage();
679  HEAVYDBLOGGER.error(err);
680  throw new RuntimeException(err);
681  }
682  return (viewFlag == 1);
683  }

+ Here is the caller graph for this function:

void com.mapd.metadata.MetaConnect.populateDatabases ( )
inlineprivate

Definition at line 831 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.connectToCatalog(), com.mapd.metadata.MetaConnect.dbPort, com.mapd.metadata.MetaConnect.disconnectFromCatalog(), and com.mapd.metadata.MetaConnect.getDatabases_SQL().

Referenced by com.mapd.metadata.MetaConnect.MetaConnect().

831  {
832  // TODO 13 Mar 2021 MAT
833  // this probably has to come across from the server on first start up rather
834  // than lazy instantiation here
835  // as a user may not be able to see all schemas and this sets it for the life
836  // of the server.
837  // Proceeding this way as a WIP
838  if (dbPort == 0) {
839  // seems to be a condition that is expected
840  // for FSI testing
841  return;
842  }
843  if (dbPort == -1) {
844  // use sql
845  connectToCatalog("system_catalog"); // hardcoded sys catalog
846  Set<String> dbNames = getDatabases_SQL();
848  for (String dbName : dbNames) {
849  Set<String> ts = new HashSet<String>();
850  DATABASE_TO_TABLES.putIfAbsent(dbName, ts);
851  }
852  return;
853  }
854  // use thrift direct to local server
855  try {
856  TProtocol protocol = null;
857  TTransport transport =
858  sock_transport_properties.openClientTransport("localhost", dbPort);
859  if (!transport.isOpen()) transport.open();
860  protocol = new TBinaryProtocol(transport);
861 
862  Heavy.Client client = new Heavy.Client(protocol);
863 
864  List<TDBInfo> dbList = client.get_databases(currentUser.getSession());
865  for (TDBInfo dbInfo : dbList) {
866  Set<String> ts = new HashSet<String>();
867  DATABASE_TO_TABLES.putIfAbsent(dbInfo.db_name, ts);
868  }
869  transport.close();
870 
871  } catch (TTransportException ex) {
872  HEAVYDBLOGGER.error("TTransportException on port [" + dbPort + "]");
873  HEAVYDBLOGGER.error(ex.toString());
874  throw new RuntimeException(ex.toString());
875  } catch (TDBException ex) {
876  HEAVYDBLOGGER.error(ex.getError_msg());
877  throw new RuntimeException(ex.getError_msg());
878  } catch (TException ex) {
879  HEAVYDBLOGGER.error(ex.toString());
880  throw new RuntimeException(ex.toString());
881  }
882  }
void connectToCatalog(String catalog)
Set< String > getDatabases_SQL()

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TDatumType com.mapd.metadata.MetaConnect.typeToThrift ( int  type)
inlineprivate

Definition at line 758 of file MetaConnect.java.

References com.mapd.metadata.MetaConnect.KBIGINT, com.mapd.metadata.MetaConnect.KBOOLEAN, com.mapd.metadata.MetaConnect.KCHAR, com.mapd.metadata.MetaConnect.KDATE, com.mapd.metadata.MetaConnect.KDECIMAL, com.mapd.metadata.MetaConnect.KDOUBLE, com.mapd.metadata.MetaConnect.KFLOAT, com.mapd.metadata.MetaConnect.KINT, com.mapd.metadata.MetaConnect.KINTERVAL_DAY_TIME, com.mapd.metadata.MetaConnect.KINTERVAL_YEAR_MONTH, com.mapd.metadata.MetaConnect.KLINESTRING, com.mapd.metadata.MetaConnect.KMULTILINESTRING, com.mapd.metadata.MetaConnect.KMULTIPOINT, com.mapd.metadata.MetaConnect.KMULTIPOLYGON, com.mapd.metadata.MetaConnect.KNUMERIC, com.mapd.metadata.MetaConnect.KPOINT, com.mapd.metadata.MetaConnect.KPOLYGON, com.mapd.metadata.MetaConnect.KSMALLINT, com.mapd.metadata.MetaConnect.KTEXT, com.mapd.metadata.MetaConnect.KTIME, com.mapd.metadata.MetaConnect.KTIMESTAMP, com.mapd.metadata.MetaConnect.KTINYINT, and com.mapd.metadata.MetaConnect.KVARCHAR.

Referenced by com.mapd.metadata.MetaConnect.get_table_detail_JSON(), and com.mapd.metadata.MetaConnect.get_table_detail_SQL().

758  {
759  switch (type) {
760  case KBOOLEAN:
761  return TDatumType.BOOL;
762  case KTINYINT:
763  return TDatumType.TINYINT;
764  case KSMALLINT:
765  return TDatumType.SMALLINT;
766  case KINT:
767  return TDatumType.INT;
768  case KBIGINT:
769  return TDatumType.BIGINT;
770  case KFLOAT:
771  return TDatumType.FLOAT;
772  case KNUMERIC:
773  case KDECIMAL:
774  return TDatumType.DECIMAL;
775  case KDOUBLE:
776  return TDatumType.DOUBLE;
777  case KTEXT:
778  case KVARCHAR:
779  case KCHAR:
780  return TDatumType.STR;
781  case KTIME:
782  return TDatumType.TIME;
783  case KTIMESTAMP:
784  return TDatumType.TIMESTAMP;
785  case KDATE:
786  return TDatumType.DATE;
787  case KINTERVAL_DAY_TIME:
788  return TDatumType.INTERVAL_DAY_TIME;
790  return TDatumType.INTERVAL_YEAR_MONTH;
791  case KPOINT:
792  return TDatumType.POINT;
793  case KMULTIPOINT:
794  return TDatumType.MULTIPOINT;
795  case KLINESTRING:
796  return TDatumType.LINESTRING;
797  case KMULTILINESTRING:
798  return TDatumType.MULTILINESTRING;
799  case KPOLYGON:
800  return TDatumType.POLYGON;
801  case KMULTIPOLYGON:
802  return TDatumType.MULTIPOLYGON;
803  default:
804  return null;
805  }
806  }
static final int KMULTIPOLYGON
static final int KMULTIPOINT
static final int KMULTILINESTRING
static final int KINTERVAL_YEAR_MONTH
static final int KLINESTRING
static final int KINTERVAL_DAY_TIME

+ Here is the caller graph for this function:

void com.mapd.metadata.MetaConnect.updateMetaData ( String  schema,
String  table 
)
inline

Definition at line 910 of file MetaConnect.java.

910  {
911  // Check if table is specified, if not we are dropping an entire DB so need to
912  // remove all
913  // tables for that DB
914  if (table.equals("")) {
915  // Drop db and all tables
916  // iterate through all and remove matching schema
917  Set<List<String>> all = new HashSet<>(DB_TABLE_DETAILS.keySet());
918  for (List<String> keys : all) {
919  if (keys.get(0).equals(schema.toUpperCase())) {
920  HEAVYDBLOGGER.debug(
921  "removing all for schema " + keys.get(0) + " table " + keys.get(1));
922  DB_TABLE_DETAILS.remove(keys);
923  }
924  }
925  } else {
926  HEAVYDBLOGGER.debug("removing schema " + schema.toUpperCase() + " table "
927  + table.toUpperCase());
928  DB_TABLE_DETAILS.remove(
929  ImmutableList.of(schema.toUpperCase(), table.toUpperCase()));
930  }
931  // Invalidate views
932  Set<List<String>> all = new HashSet<>(DB_TABLE_DETAILS.keySet());
933  for (List<String> keys : all) {
934  if (keys.get(0).equals(schema.toUpperCase())) {
935  Table ttable = DB_TABLE_DETAILS.get(keys);
936  if (ttable instanceof HeavyDBView) {
937  HEAVYDBLOGGER.debug(
938  "removing view in schema " + keys.get(0) + " view " + keys.get(1));
939  DB_TABLE_DETAILS.remove(keys);
940  }
941  }
942  }
943  // Could be a removal or an add request for a DB
944  Set<String> mSet = DATABASE_TO_TABLES.get(schema.toUpperCase());
945  if (mSet != null) {
946  HEAVYDBLOGGER.debug("removing schema " + schema.toUpperCase());
947  DATABASE_TO_TABLES.remove(schema.toUpperCase());
948  } else {
949  // add a empty database descriptor for new DB, it will be lazily populated when
950  // required
951  Set<String> ts = new HashSet<String>();
952  DATABASE_TO_TABLES.putIfAbsent(schema.toUpperCase(), ts);
953  }
954  }

Member Data Documentation

final String com.mapd.metadata.MetaConnect.CATALOG_DIR_NAME = "catalogs"
staticprivate
Connection com.mapd.metadata.MetaConnect.catConn
private

Definition at line 72 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.connectToCatalog().

final HeavyDBUser com.mapd.metadata.MetaConnect.currentUser
private

Definition at line 70 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.MetaConnect().

volatile Map<String, Set<String> > com.mapd.metadata.MetaConnect.DATABASE_TO_TABLES
staticprivate
Initial value:
=
new ConcurrentHashMap<>()

Definition at line 101 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.getDatabases(), and com.mapd.metadata.MetaConnect.MetaConnect().

volatile Map<List<String>, Table> com.mapd.metadata.MetaConnect.DB_TABLE_DETAILS
staticprivate
Initial value:
=
new ConcurrentHashMap<>()

Definition at line 103 of file MetaConnect.java.

final Logger com.mapd.metadata.MetaConnect.HEAVYDBLOGGER = LoggerFactory.getLogger(MetaConnect.class)
staticpackage

Definition at line 67 of file MetaConnect.java.

final int com.mapd.metadata.MetaConnect.KARRAY = 15
staticprivate
final int com.mapd.metadata.MetaConnect.KBIGINT = 12
staticprivate

Definition at line 86 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KBOOLEAN = 1
staticprivate

Definition at line 75 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KCHAR = 2
staticprivate

Definition at line 76 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KDATE = 14
staticprivate

Definition at line 88 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KDECIMAL = 5
staticprivate

Definition at line 79 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KDOUBLE = 9
staticprivate

Definition at line 83 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KFLOAT = 8
staticprivate

Definition at line 82 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KINT = 6
staticprivate

Definition at line 80 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KINTERVAL_DAY_TIME = 16
staticprivate

Definition at line 90 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KINTERVAL_YEAR_MONTH = 17
staticprivate

Definition at line 91 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KLINESTRING = 19
staticprivate
final int com.mapd.metadata.MetaConnect.KMULTILINESTRING = 30
staticprivate
final int com.mapd.metadata.MetaConnect.KMULTIPOINT = 31
staticprivate
final int com.mapd.metadata.MetaConnect.KMULTIPOLYGON = 21
staticprivate
final int com.mapd.metadata.MetaConnect.KNUMERIC = 4
staticprivate

Definition at line 78 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KPOINT = 18
staticprivate
final int com.mapd.metadata.MetaConnect.KPOLYGON = 20
staticprivate
final int com.mapd.metadata.MetaConnect.KSMALLINT = 7
staticprivate

Definition at line 81 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KTEXT = 13
staticprivate

Definition at line 87 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KTIME = 10
staticprivate

Definition at line 84 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KTIMESTAMP = 11
staticprivate

Definition at line 85 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KTINYINT = 22
staticprivate

Definition at line 96 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final int com.mapd.metadata.MetaConnect.KVARCHAR = 3
staticprivate

Definition at line 77 of file MetaConnect.java.

Referenced by com.mapd.metadata.MetaConnect.typeToThrift().

final HeavyDBParser com.mapd.metadata.MetaConnect.parser
private
final SockTransportProperties com.mapd.metadata.MetaConnect.sock_transport_properties
private

Definition at line 105 of file MetaConnect.java.


The documentation for this class was generated from the following file: