public int getLastAccessTime() { return tTable.getLastAccessTime(); }
public int getLastAccessTime() { return tTable.getLastAccessTime(); }
private static void getTableMetaDataInformation(StringBuilder tableInfo, Table tbl, boolean isOutputPadded) { formatOutput("Database:", tbl.getDbName(), tableInfo); formatOutput("Owner:", tbl.getOwner(), tableInfo); formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo); formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo); formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo); if (!tbl.isView()) { formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo); } formatOutput("Table Type:", tbl.getTableType().name(), tableInfo); if (tbl.getParameters().size() > 0) { tableInfo.append("Table Parameters:").append(LINE_DELIM); displayAllParameters(tbl.getParameters(), tableInfo, false, isOutputPadded); } }
private static void getTableMetaDataInformation(StringBuilder tableInfo, Table tbl, boolean isOutputPadded) { formatOutput("Database:", tbl.getDbName(), tableInfo); formatOutput("OwnerType:", (tbl.getOwnerType() != null) ? tbl.getOwnerType().name() : "null", tableInfo); formatOutput("Owner:", tbl.getOwner(), tableInfo); formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo); formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo); formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo); if (!tbl.isView()) { formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo); } formatOutput("Table Type:", tbl.getTableType().name(), tableInfo); if (tbl.getParameters().size() > 0) { tableInfo.append("Table Parameters:").append(LINE_DELIM); displayAllParameters(tbl.getParameters(), tableInfo, false, isOutputPadded); } }
builder.setSdOutputFormat(table.getSd().getOutputFormat()); builder.setOwner(table.getOwner()); builder.setLastAccessTime(table.getLastAccessTime()); builder.setTableType(table.getTableType()); builder.setSkipHeaderLineCount(table.getParameters().get("skip.header.line.count"));
.getCreateTime(), tbl.getLastAccessTime(), tbl.getRetention(), convertToMFieldSchemas(tbl.getPartitionKeys()), tbl.getParameters(), tbl.getViewOriginalText(), tbl.getViewExpandedText(), tbl.isRewriteEnabled(),
return getLastAccessTime();
Assert.assertNull("Comparing OwnerName", createdTable.getOwner()); Assert.assertNotEquals("Comparing CreateTime", 0, createdTable.getCreateTime()); Assert.assertEquals("Comparing LastAccessTime", 0, createdTable.getLastAccessTime()); Assert.assertEquals("Comparing Retention", 0, createdTable.getRetention()); Assert.assertEquals("Comparing PartitionKeys", 0, createdTable.getPartitionKeys().size());
map.put(MetadataConstants.TABLE_EXD_OF, table.getSd().getOutputFormat()); map.put(MetadataConstants.TABLE_EXD_OWNER, table.getOwner()); map.put(MetadataConstants.TABLE_EXD_LAT, String.valueOf(table.getLastAccessTime())); map.put(MetadataConstants.TABLE_EXD_PC, partitionColumnString.toString()); map.put(MetadataConstants.TABLE_EXD_TFS, String.valueOf(tableSize));
public int getLastAccessTime() { return tTable.getLastAccessTime(); }
public int getLastAccessTime() { return tTable.getLastAccessTime(); }
return new Integer(getLastAccessTime());
private static void getTableMetaDataInformation(StringBuilder tableInfo, Table tbl) { formatOutput("Database:", tbl.getDbName(), tableInfo); formatOutput("Owner:", tbl.getOwner(), tableInfo); formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo); formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo); String protectMode = tbl.getProtectMode().toString(); formatOutput("Protect Mode:", protectMode == null ? "None" : protectMode, tableInfo); formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo); if (!tbl.isView()) { formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo); } formatOutput("Table Type:", tbl.getTableType().name(), tableInfo); if (tbl.getParameters().size() > 0) { tableInfo.append("Table Parameters:").append(LINE_DELIM); displayAllParameters(tbl.getParameters(), tableInfo); } }
private static void getTableMetaDataInformation(StringBuilder tableInfo, Table tbl) { formatOutput("Database:", tbl.getDbName(), tableInfo); formatOutput("Owner:", tbl.getOwner(), tableInfo); formatOutput("CreateTime:", formatDate(tbl.getTTable().getCreateTime()), tableInfo); formatOutput("LastAccessTime:", formatDate(tbl.getTTable().getLastAccessTime()), tableInfo); String protectMode = tbl.getProtectMode().toString(); formatOutput("Protect Mode:", protectMode == null ? "None" : protectMode, tableInfo); formatOutput("Retention:", Integer.toString(tbl.getRetention()), tableInfo); if (!tbl.isView()) { formatOutput("Location:", tbl.getDataLocation().toString(), tableInfo); } formatOutput("Table Type:", tbl.getTableType().name(), tableInfo); if (tbl.getParameters().size() > 0) { tableInfo.append("Table Parameters:").append(LINE_DELIM); displayAllParameters(tbl.getParameters(), tableInfo); } }
.getCreateTime(), tbl.getLastAccessTime(), tbl.getRetention(), convertToMFieldSchemas(tbl.getPartitionKeys()), tbl.getParameters(), tbl.getViewOriginalText(), tbl.getViewExpandedText(),
.getCreateTime(), tbl.getLastAccessTime(), tbl.getRetention(), convertToMFieldSchemas(tbl.getPartitionKeys()), tbl.getParameters(), tbl.getViewOriginalText(), tbl.getViewExpandedText(),
/** * Create an CatalogTable from Hive table. */ public static CatalogTable createCatalogTable(Table hiveTable, TableSchema tableSchema, TableStats tableStats) { return new CatalogTable( "hive", tableSchema, getPropertiesFromHiveTable(hiveTable), new RichTableSchema(tableSchema.getFieldNames(), tableSchema.getFieldTypes()), tableStats, null, getPartitionCols(hiveTable), hiveTable.getPartitionKeysSize() != 0, null, null, -1L, (long) hiveTable.getCreateTime(), (long) hiveTable.getLastAccessTime(), false); }
.getCreateTime(), tbl.getLastAccessTime(), tbl.getRetention(), convertToMFieldSchemas(tbl.getPartitionKeys()), tbl.getParameters(), tbl.getViewOriginalText(), tbl.getViewExpandedText(),
public static XNativeTable nativeTableFromMetaTable(Table table) { XNativeTable xtable = XCF.createXNativeTable(); xtable.setColumns(new XColumns()); xtable.setName(table.getTableName()); xtable.setDbname(table.getDbName()); xtable.setOwner(table.getOwner()); xtable.setCreatetime(table.getTTable().getCreateTime()); xtable.setLastAccessTime(table.getTTable().getLastAccessTime()); xtable.getColumns().getColumn().addAll(columnsFromFieldSchemaList(table.getCols())); xtable.setStorageDescriptor(getStorageTableDescFromHiveTable(table)); xtable.setTableType(table.getTableType().name()); return xtable; }
public static XNativeTable nativeTableFromMetaTable(Table table) { XNativeTable xtable = XCF.createXNativeTable(); xtable.setColumns(new XColumns()); xtable.setName(table.getTableName()); xtable.setDbname(table.getDbName()); xtable.setOwner(table.getOwner()); xtable.setCreatetime(table.getTTable().getCreateTime()); xtable.setLastAccessTime(table.getTTable().getLastAccessTime()); xtable.getColumns().getColumn().addAll(columnsFromFieldSchemaList(table.getCols())); xtable.setStorageDescriptor(getStorageTableDescFromHiveTable(table)); xtable.setTableType(table.getTableType().name()); return xtable; }