private void setRowsCount(TableName tableName, TableStatistics tableStatistics, Table table) throws TException { Map<String, String> tableParameters = table.getParameters(); tableParameters.put("numRows", Long.toString(tableStatistics.getRowCount())); // setting other parameters just to pretend hive analyze task String dataSize = Long.toString(tableStatistics.getRowCount() * table.getSd().getCols().size() * 42); tableParameters.put("rawDataSize", dataSize); tableParameters.put("totalSize", dataSize); tableParameters.put("numFiles", "1"); tableParameters.put("STATS_GENERATED_VIA_STATS_TASK", "true"); client.alter_table(getSchema(tableName), tableName.getSchemalessNameInDatabase(), table); }
private void setRowsCount(TableName tableName, TableStatistics tableStatistics, Table table) throws TException { Map<String, String> tableParameters = table.getParameters(); tableParameters.put("numRows", Long.toString(tableStatistics.getRowCount())); // setting other parameters just to pretend hive analyze task String dataSize = Long.toString(tableStatistics.getRowCount() * table.getSd().getCols().size() * 42); tableParameters.put("rawDataSize", dataSize); tableParameters.put("totalSize", dataSize); tableParameters.put("numFiles", "1"); tableParameters.put("STATS_GENERATED_VIA_STATS_TASK", "true"); client.alter_table(getSchema(tableName), tableName.getSchemalessNameInDatabase(), table); }
metaStoreClient.alter_table(database, tableName, tbl); } else { metaStoreClient.create_table(tbl);
/** * TODO. * * @param dbName TODO * @param tableName TODO * @param table TODO * * @throws HiveMetastoreException TODO */ public synchronized void alterTable(String dbName, String tableName, Table table) throws HiveMetastoreException { try { connectIfNeeded(); client.alter_table(dbName, tableName, table); } catch (TException e) { close(); throw new HiveMetastoreException(e); } }
/** * TODO. * * @param dbName TODO * @param tableName TODO * @param table TODO * * @throws HiveMetastoreException TODO */ public synchronized void alterTable(String dbName, String tableName, Table table) throws HiveMetastoreException { try { connectIfNeeded(); client.alter_table(dbName, tableName, table); } catch (TException e) { close(); throw new HiveMetastoreException(e); } }
@Override public void alterTable(String databaseName, String tableName, Table newTable) throws TException { client.alter_table(databaseName, tableName, newTable); }
@Override public void alterTable(String databaseName, String tableName, Table newTable) throws TException { client.alter_table(databaseName, tableName, newTable); }
@Override public void alterTable(String databaseName, String tableName, Table newTable) throws TException { client.alter_table(databaseName, tableName, newTable); }