Java Code Examples for org.apache.hadoop.hive.metastore.api.Index#setDeferredRebuild()
The following examples show how to use
org.apache.hadoop.hive.metastore.api.Index#setDeferredRebuild() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CatalogToHiveConverter.java From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 | 6 votes |
public static Index convertTableObjectToIndex(com.amazonaws.services.glue.model.Table catalogTable) { Index hiveIndex = new Index(); Map<String, String> parameters = catalogTable.getParameters(); hiveIndex.setIndexName(catalogTable.getName()); hiveIndex.setCreateTime((int) (catalogTable.getCreateTime().getTime() / 1000)); hiveIndex.setLastAccessTime((int) (catalogTable.getLastAccessTime().getTime() / 1000)); hiveIndex.setSd(convertStorageDescriptor(catalogTable.getStorageDescriptor())); hiveIndex.setParameters(catalogTable.getParameters()); hiveIndex.setDeferredRebuild(parameters.get(INDEX_DEFERRED_REBUILD).equals("TRUE")); hiveIndex.setIndexHandlerClass(parameters.get(INDEX_HANDLER_CLASS)); hiveIndex.setDbName(parameters.get(INDEX_DB_NAME)); hiveIndex.setOrigTableName(parameters.get(INDEX_ORIGIN_TABLE_NAME)); hiveIndex.setIndexTableName(parameters.get(INDEX_TABLE_NAME)); return hiveIndex; }
Example 2
Source File: TestObjects.java From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 | 5 votes |
public static Index getTestHiveIndex(final String dbName) { Index index = new Index(); index.setIndexName("testIndex" + UUID.randomUUID().toString().replaceAll("[^a-zA-Z0-9]+", "")); index.setCreateTime((int)(System.currentTimeMillis() / 1000)); index.setLastAccessTime((int)(System.currentTimeMillis() / 1000)); index.setDbName(dbName); index.setDeferredRebuild(false); index.setOrigTableName("OriginalTable"); index.setIndexTableName("IndexTable"); index.setIndexHandlerClass("handlerClass"); index.setParameters(new HashMap<String, String>()); index.setSd(CatalogToHiveConverter.convertStorageDescriptor(getTestStorageDescriptor())); return index; }