org.apache.hadoop.hive.metastore.api.TableStatsRequest Java Examples
The following examples show how to use
org.apache.hadoop.hive.metastore.api.TableStatsRequest.
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: ThriftHiveMetastoreClient.java From presto with Apache License 2.0 | 5 votes |
@Override public List<ColumnStatisticsObj> getTableColumnStatistics(String databaseName, String tableName, List<String> columnNames) throws TException { TableStatsRequest tableStatsRequest = new TableStatsRequest(databaseName, tableName, columnNames); return client.get_table_statistics_req(tableStatsRequest).getTableStats(); }
Example #2
Source File: FederatedHMSHandler.java From waggle-dance with Apache License 2.0 | 5 votes |
@Override @Loggable(value = Loggable.DEBUG, skipResult = true, name = INVOCATION_LOG_NAME) public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws NoSuchObjectException, MetaException, TException { DatabaseMapping mapping = databaseMappingService.databaseMapping(request.getDbName()); return mapping.getClient().get_table_statistics_req(mapping.transformInboundTableStatsRequest(request)); }
Example #3
Source File: DatabaseMappingImplTest.java From waggle-dance with Apache License 2.0 | 5 votes |
@Test public void transformInboundTableStatsRequest() throws Exception { TableStatsRequest tableStatsRequest = new TableStatsRequest(); tableStatsRequest.setDbName(DB_NAME); TableStatsRequest result = databaseMapping.transformInboundTableStatsRequest(tableStatsRequest); assertThat(result, is(sameInstance(tableStatsRequest))); assertThat(result.getDbName(), is(IN_DB_NAME)); }
Example #4
Source File: FederatedHMSHandlerTest.java From waggle-dance with Apache License 2.0 | 5 votes |
@Test public void get_table_statistics_req() throws TException { TableStatsRequest tableStatsRequest = new TableStatsRequest(DB_P, "table", Collections.emptyList()); TableStatsRequest inboundTableStatsRequest = new TableStatsRequest(); TableStatsResult expected = new TableStatsResult(); when(primaryMapping.transformInboundTableStatsRequest(tableStatsRequest)).thenReturn(inboundTableStatsRequest); when(primaryClient.get_table_statistics_req(inboundTableStatsRequest)).thenReturn(expected); TableStatsResult result = handler.get_table_statistics_req(tableStatsRequest); assertThat(result, is(expected)); }
Example #5
Source File: DatabaseMappingImpl.java From waggle-dance with Apache License 2.0 | 4 votes |
@Override public TableStatsRequest transformInboundTableStatsRequest(TableStatsRequest request) { request.setDbName(metaStoreMapping.transformInboundDatabaseName(request.getDbName())); return request; }
Example #6
Source File: IdentityMapping.java From waggle-dance with Apache License 2.0 | 4 votes |
@Override public TableStatsRequest transformInboundTableStatsRequest(TableStatsRequest request) { return request; }
Example #7
Source File: IdentityMappingTest.java From waggle-dance with Apache License 2.0 | 4 votes |
@Test public void transformInboundTableStatsRequest() throws Exception { TableStatsRequest tableStatsRequest = new TableStatsRequest(); TableStatsRequest result = databaseMapping.transformInboundTableStatsRequest(tableStatsRequest); assertThat(result, is(sameInstance(tableStatsRequest))); }
Example #8
Source File: CatalogThriftHiveMetastore.java From metacat with Apache License 2.0 | 4 votes |
/** * {@inheritDoc} */ @Override public TableStatsResult get_table_statistics_req(final TableStatsRequest request) throws TException { throw unimplemented("get_table_statistics_req", new Object[]{request}); }
Example #9
Source File: DatabaseMapping.java From waggle-dance with Apache License 2.0 | votes |
TableStatsRequest transformInboundTableStatsRequest(TableStatsRequest request);