OmniSciDB  a5dc49c757
 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)
 

Package Functions

String getCatalogFileName (String catalog)
 

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, com.mapd.metadata.MetaConnect.dataDir, and com.mapd.metadata.MetaConnect.getCatalogFileName().

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 + "/"
165  + getCatalogFileName(catalog);
166  try {
167  catConn = DriverManager.getConnection(connectURL);
168  } catch (SQLException ex) {
169  String err = "Could not establish a connection for metadata; DB: '" + catalog
170  + "' data dir '" + dataDir + "', error was " + ex.getMessage();
171  HEAVYDBLOGGER.error(err);
172  throw new RuntimeException(err);
173  }
174  HEAVYDBLOGGER.debug("Opened database successfully");
175  }
String getCatalogFileName(String catalog)
static final String CATALOG_DIR_NAME

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 202 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().

202  {
204  }
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 191 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().

191  {
192  try {
193  catConn.close();
194  } catch (SQLException ex) {
195  String err = "Could not disconnect from metadata "
196  + " data dir '" + dataDir + "', error was " + ex.getMessage();
197  HEAVYDBLOGGER.error(err);
198  throw new RuntimeException(err);
199  }
200  }

+ Here is the caller graph for this function:

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

Definition at line 823 of file MetaConnect.java.

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

823  {
824  switch (comp) {
825  case 0:
826  return TEncodingType.NONE;
827  case 1:
828  return TEncodingType.FIXED;
829  case 2:
830  return TEncodingType.RL;
831  case 3:
832  return TEncodingType.DIFF;
833  case 4:
834  return TEncodingType.DICT;
835  case 5:
836  return TEncodingType.SPARSE;
837  case 6:
838  return TEncodingType.GEOINT;
839  case 7:
840  return TEncodingType.DATE_IN_DAYS;
841  default:
842  return null;
843  }
844  }

+ Here is the caller graph for this function:

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

Definition at line 385 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().

385  {
386  switch (type) {
387  case KPOINT:
388  return 1; // coords
389  case KMULTIPOINT:
390  case KLINESTRING:
391  return 2; // coords, bounds
392  case KMULTILINESTRING:
393  return 3; // coords, linestring_sizes, bounds
394  case KPOLYGON:
395  return 3; // coords, ring_sizes, bounds
396  case KMULTIPOLYGON:
397  return 4; // coords, ring_sizes, poly_rings, bounds
398  default:
399  break;
400  }
401  return 0;
402  }
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 522 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().

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

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

350  {
351  if (dbPort == -1) {
352  // use sql
354  TTableDetails td = get_table_detail_SQL(tableName);
356  return td;
357  }
358  try {
359  // use thrift direct to local server
360  TProtocol protocol = null;
361 
362  TTransport transport =
363  sock_transport_properties.openClientTransport("localhost", dbPort);
364  if (!transport.isOpen()) transport.open();
365  protocol = new TBinaryProtocol(transport);
366 
367  Heavy.Client client = new Heavy.Client(protocol);
368  TTableDetails td = client.get_internal_table_details_for_database(
369  currentUser.getSession(), tableName, default_db);
370  transport.close();
371 
372  return td;
373  } catch (TTransportException ex) {
374  HEAVYDBLOGGER.error(ex.toString());
375  throw new RuntimeException(ex.toString());
376  } catch (TDBException ex) {
377  HEAVYDBLOGGER.error(ex.getError_msg());
378  throw new RuntimeException(ex.getError_msg());
379  } catch (TException ex) {
380  HEAVYDBLOGGER.error(ex.toString());
381  throw new RuntimeException(ex.toString());
382  }
383  }
TTableDetails get_table_detail_SQL(String tableName)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

String com.mapd.metadata.MetaConnect.getCatalogFileName ( String  catalog)
inlinepackage

Definition at line 177 of file MetaConnect.java.

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

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

177  {
178  String path = dataDir + "/" + CATALOG_DIR_NAME;
179  File directory = new File(path);
180  if (!directory.isDirectory()) {
181  throw new RuntimeException("Catalog directory not found at: " + path);
182  }
183  for (File file : directory.listFiles()) {
184  if (file.getName().equalsIgnoreCase(catalog)) {
185  return file.getName();
186  }
187  }
188  throw new RuntimeException("Database file not found for: " + catalog);
189  }
static final String CATALOG_DIR_NAME

+ 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.

Referenced by com.mapd.calcite.parser.HeavyDBParser.getPlanner().

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

+ Here is the caller graph for this function:

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

Definition at line 899 of file MetaConnect.java.

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

899  {
900  Set<String> dbSet = new HashSet<String>();
901  Statement stmt = null;
902  ResultSet rs = null;
903  String sqlText = "";
904  try {
905  stmt = catConn.createStatement();
906 
907  // get the tables
908  rs = stmt.executeQuery("SELECT name FROM mapd_databases ");
909  while (rs.next()) {
910  dbSet.add(rs.getString("name"));
911  /*--*/
912  HEAVYDBLOGGER.debug("Object name = " + rs.getString("name"));
913  }
914  rs.close();
915  stmt.close();
916 
917  } catch (Exception e) {
918  String err = "error trying to get all the databases, error was " + e.getMessage();
919  HEAVYDBLOGGER.error(err);
920  throw new RuntimeException(err);
921  }
922  return dbSet;
923  }

+ Here is the caller graph for this function:

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

Definition at line 206 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.

206  {
207  List<String> dbTable =
208  ImmutableList.of(default_db.toUpperCase(), tableName.toUpperCase());
209  Table cTable = DB_TABLE_DETAILS.get(dbTable);
210  if (cTable != null) {
211  HEAVYDBLOGGER.debug("Metaconnect DB " + default_db + " get table " + tableName
212  + " details " + cTable);
213  return cTable;
214  }
215 
216  TTableDetails td = get_table_details(tableName);
217 
218  if (td.getView_sql() == null || td.getView_sql().isEmpty()) {
219  HEAVYDBLOGGER.debug("Processing a table");
220  Table rTable = new HeavyDBTable(td);
221  DB_TABLE_DETAILS.putIfAbsent(dbTable, rTable);
222  HEAVYDBLOGGER.debug("Metaconnect DB " + default_db + " get table " + tableName
223  + " details " + rTable + " Not in buffer");
224  return rTable;
225  } else {
226  HEAVYDBLOGGER.debug("Processing a view");
227  Table rTable = new HeavyDBView(getViewSql(tableName), td, parser);
228  DB_TABLE_DETAILS.putIfAbsent(dbTable, rTable);
229  HEAVYDBLOGGER.debug("Metaconnect DB " + default_db + " get view " + tableName
230  + " details " + rTable + " Not in buffer");
231  return rTable;
232  }
233  }
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 632 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().

632  {
633  Statement stmt = null;
634  ResultSet rs = null;
635  int tableId = -1;
636  try {
637  stmt = catConn.createStatement();
638  rs = stmt.executeQuery(String.format(
639  "SELECT tableid FROM mapd_tables where name = '%s' COLLATE NOCASE;",
640  tableName));
641  while (rs.next()) {
642  tableId = rs.getInt("tableid");
643  HEAVYDBLOGGER.debug("tableId = " + tableId);
644  HEAVYDBLOGGER.debug("");
645  }
646  rs.close();
647  stmt.close();
648  } catch (Exception e) {
649  String err = "Error trying to read from metadata table mapd_tables;DB: "
650  + default_db + " data dir " + dataDir + ", error was " + e.getMessage();
651  HEAVYDBLOGGER.error(err);
652  throw new RuntimeException(err);
653  } finally {
654  if (rs != null) {
655  try {
656  rs.close();
657  } catch (SQLException ex) {
658  String err = "Could not close resultset, error was " + ex.getMessage();
659  HEAVYDBLOGGER.error(err);
660  throw new RuntimeException(err);
661  }
662  }
663  if (stmt != null) {
664  try {
665  stmt.close();
666  } catch (SQLException ex) {
667  String err = "Could not close stmt, error was " + ex.getMessage();
668  HEAVYDBLOGGER.error(err);
669  throw new RuntimeException(err);
670  }
671  }
672  }
673  return (tableId);
674  }

+ Here is the caller graph for this function:

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

Definition at line 235 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().

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

+ Here is the call graph for this function:

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

Definition at line 287 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().

287  {
289  Set<String> tableSet = new HashSet<String>();
290  Statement stmt = null;
291  ResultSet rs = null;
292  String sqlText = "";
293  try {
294  stmt = catConn.createStatement();
295 
296  // get the tables
297  rs = stmt.executeQuery("SELECT name FROM mapd_tables ");
298  while (rs.next()) {
299  tableSet.add(rs.getString("name"));
300  /*--*/
301  HEAVYDBLOGGER.debug("Object name = " + rs.getString("name"));
302  }
303  rs.close();
304  stmt.close();
305 
306  } catch (Exception e) {
307  String err = "error trying to get all the tables, error was " + e.getMessage();
308  HEAVYDBLOGGER.error(err);
309  throw new RuntimeException(err);
310  }
312 
313  try {
314  // open temp table json file
315  final String filePath =
316  dataDir + "/" + CATALOG_DIR_NAME + "/" + default_db + "_temp_tables.json";
317  HEAVYDBLOGGER.debug("Opening temp table file at " + filePath);
318  String tempTablesJsonStr;
319  try {
320  File tempTablesFile = new File(filePath);
321  FileInputStream tempTablesStream = new FileInputStream(tempTablesFile);
322  byte[] data = new byte[(int) tempTablesFile.length()];
323  tempTablesStream.read(data);
324  tempTablesStream.close();
325 
326  tempTablesJsonStr = new String(data, "UTF-8");
327  } catch (java.io.FileNotFoundException e) {
328  return tableSet;
329  }
330 
331  Gson gson = new Gson();
332  JsonObject fileParentObject = gson.fromJson(tempTablesJsonStr, JsonObject.class);
333  for (Entry<String, JsonElement> member : fileParentObject.entrySet()) {
334  String tableName = member.getKey();
335  tableSet.add(tableName);
336  /*--*/
337  HEAVYDBLOGGER.debug("Temp table object name = " + tableName);
338  }
339 
340  } catch (Exception e) {
341  String err = "error trying to load temporary tables from json file, error was "
342  + e.getMessage();
343  HEAVYDBLOGGER.error(err);
344  throw new RuntimeException(err);
345  }
346 
347  return tableSet;
348  }
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 700 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().

700  {
701  String sqlText;
702  if (dbPort == -1) {
703  // use sql
705  sqlText = getViewSqlViaSql(getTableId(tableName));
707  } else {
708  // use thrift direct to local server
709  try {
710  TProtocol protocol = null;
711 
712  TTransport transport =
713  sock_transport_properties.openClientTransport("localhost", dbPort);
714  if (!transport.isOpen()) transport.open();
715  protocol = new TBinaryProtocol(transport);
716 
717  Heavy.Client client = new Heavy.Client(protocol);
718  TTableDetails td = client.get_table_details_for_database(
719  currentUser.getSession(), tableName, default_db);
720  transport.close();
721 
722  sqlText = td.getView_sql();
723 
724  } catch (TTransportException ex) {
725  HEAVYDBLOGGER.error(ex.toString());
726  throw new RuntimeException(ex.toString());
727  } catch (TDBException ex) {
728  HEAVYDBLOGGER.error(ex.getError_msg());
729  throw new RuntimeException(ex.getError_msg());
730  } catch (TException ex) {
731  HEAVYDBLOGGER.error(ex.toString());
732  throw new RuntimeException(ex.toString());
733  }
734  }
735  /* return string without the sqlite's trailing semicolon */
736  if (sqlText.charAt(sqlText.length() - 1) == ';') {
737  return (sqlText.substring(0, sqlText.length() - 1));
738  } else {
739  return (sqlText);
740  }
741  }
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 744 of file MetaConnect.java.

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

744  {
745  Statement stmt;
746  ResultSet rs;
747  String sqlText = "";
748  try {
749  stmt = catConn.createStatement();
750  rs = stmt.executeQuery(String.format(
751  "SELECT sql FROM mapd_views where tableid = '%s' COLLATE NOCASE;",
752  tableId));
753  while (rs.next()) {
754  sqlText = rs.getString("sql");
755  HEAVYDBLOGGER.debug("View definition = " + sqlText);
756  HEAVYDBLOGGER.debug("");
757  }
758  rs.close();
759  stmt.close();
760  } catch (Exception e) {
761  String err = "error trying to read from mapd_views, error was " + e.getMessage();
762  HEAVYDBLOGGER.error(err);
763  throw new RuntimeException(err);
764  }
765  if (sqlText == null || sqlText.length() == 0) {
766  String err = "No view text found";
767  HEAVYDBLOGGER.error(err);
768  throw new RuntimeException(err);
769  }
770  return sqlText;
771  }

+ 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 676 of file MetaConnect.java.

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

676  {
677  Statement stmt;
678  ResultSet rs;
679  int viewFlag = 0;
680  try {
681  stmt = catConn.createStatement();
682  rs = stmt.executeQuery(String.format(
683  "SELECT isview FROM mapd_tables where name = '%s' COLLATE NOCASE;",
684  tableName));
685  while (rs.next()) {
686  viewFlag = rs.getInt("isview");
687  HEAVYDBLOGGER.debug("viewFlag = " + viewFlag);
688  HEAVYDBLOGGER.debug("");
689  }
690  rs.close();
691  stmt.close();
692  } catch (Exception e) {
693  String err = "error trying to read from mapd_views, error was " + e.getMessage();
694  HEAVYDBLOGGER.error(err);
695  throw new RuntimeException(err);
696  }
697  return (viewFlag == 1);
698  }

+ Here is the caller graph for this function:

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

Definition at line 846 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().

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

773  {
774  switch (type) {
775  case KBOOLEAN:
776  return TDatumType.BOOL;
777  case KTINYINT:
778  return TDatumType.TINYINT;
779  case KSMALLINT:
780  return TDatumType.SMALLINT;
781  case KINT:
782  return TDatumType.INT;
783  case KBIGINT:
784  return TDatumType.BIGINT;
785  case KFLOAT:
786  return TDatumType.FLOAT;
787  case KNUMERIC:
788  case KDECIMAL:
789  return TDatumType.DECIMAL;
790  case KDOUBLE:
791  return TDatumType.DOUBLE;
792  case KTEXT:
793  case KVARCHAR:
794  case KCHAR:
795  return TDatumType.STR;
796  case KTIME:
797  return TDatumType.TIME;
798  case KTIMESTAMP:
799  return TDatumType.TIMESTAMP;
800  case KDATE:
801  return TDatumType.DATE;
802  case KINTERVAL_DAY_TIME:
803  return TDatumType.INTERVAL_DAY_TIME;
805  return TDatumType.INTERVAL_YEAR_MONTH;
806  case KPOINT:
807  return TDatumType.POINT;
808  case KMULTIPOINT:
809  return TDatumType.MULTIPOINT;
810  case KLINESTRING:
811  return TDatumType.LINESTRING;
812  case KMULTILINESTRING:
813  return TDatumType.MULTILINESTRING;
814  case KPOLYGON:
815  return TDatumType.POLYGON;
816  case KMULTIPOLYGON:
817  return TDatumType.MULTIPOLYGON;
818  default:
819  return null;
820  }
821  }
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 925 of file MetaConnect.java.

925  {
926  // Check if table is specified, if not we are dropping an entire DB so need to
927  // remove all tables for that DB
928  if (table.equals("")) {
929  // Drop db and all tables
930  // iterate through all and remove matching schema
931  Set<List<String>> all = new HashSet<>(DB_TABLE_DETAILS.keySet());
932  for (List<String> keys : all) {
933  if (keys.get(0).equals(schema.toUpperCase())) {
934  HEAVYDBLOGGER.debug(
935  "removing all for schema " + keys.get(0) + " table " + keys.get(1));
936  DB_TABLE_DETAILS.remove(keys);
937  }
938  }
939  } else {
940  HEAVYDBLOGGER.debug("removing schema " + schema.toUpperCase() + " table "
941  + table.toUpperCase());
942  DB_TABLE_DETAILS.remove(
943  ImmutableList.of(schema.toUpperCase(), table.toUpperCase()));
944  }
945  // Invalidate views
946  Set<List<String>> all = new HashSet<>(DB_TABLE_DETAILS.keySet());
947  for (List<String> keys : all) {
948  if (keys.get(0).equals(schema.toUpperCase())) {
949  Table ttable = DB_TABLE_DETAILS.get(keys);
950  if (ttable instanceof HeavyDBView) {
951  HEAVYDBLOGGER.debug(
952  "removing view in schema " + keys.get(0) + " view " + keys.get(1));
953  DB_TABLE_DETAILS.remove(keys);
954  }
955  }
956  }
957  // Could be a removal or an add request for a DB
958  Set<String> mSet = DATABASE_TO_TABLES.get(schema.toUpperCase());
959  if (mSet != null) {
960  if (table.isEmpty()) {
961  // If table is not specified, then we are dropping an entire DB.
962  HEAVYDBLOGGER.debug("removing schema " + schema.toUpperCase());
963  DATABASE_TO_TABLES.remove(schema.toUpperCase());
964  } else {
965  mSet.clear();
966  }
967  } else {
968  // add a empty database descriptor for new DB, it will be lazily populated when
969  // required
970  Set<String> ts = new HashSet<String>();
971  DATABASE_TO_TABLES.putIfAbsent(schema.toUpperCase(), ts);
972  }
973  }

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: