String getTokenSignature(OutputJobInfo outputJobInfo) { StringBuilder result = new StringBuilder(""); String dbName = outputJobInfo.getDatabaseName(); if (dbName != null) { result.append(dbName); } String tableName = outputJobInfo.getTableName(); if (tableName != null) { result.append("." + tableName); } Map<String, String> partValues = outputJobInfo.getPartitionValues(); if (partValues != null) { for (Entry<String, String> entry : partValues.entrySet()) { result.append("/"); result.append(entry.getKey()); result.append("="); result.append(entry.getValue()); } } return result.toString(); }
mytableProperties.setProperty( org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, outputJobInfo.getDatabaseName()+ "." + outputJobInfo.getTableName());
table, outputInfo.getPartitionValues()); List<String> currentParts = client.listPartitionNames(outputInfo.getDatabaseName(), outputInfo.getTableName(), partitionValues, (short) 1);
Table table = HCatUtil.getTable(client, outputJobInfo.getDatabaseName(), outputJobInfo.getTableName());
@Override public String toString() { return new ToStringBuilder(this) .append("database", info.getDatabaseName()) .append("table", info.getTableName()) .append("partition", info.getPartitionValues()) .toString(); }
@Override public boolean equals(Object o) { if (o == null || !getClass().equals(o.getClass())) { return false; } HCatTarget that = (HCatTarget) o; return Objects.equal(this.info.getDatabaseName(), that.info.getDatabaseName()) && Objects.equal(this.info.getTableName(), that.info.getTableName()) && Objects.equal(this.info.getPartitionValues(), that.info.getPartitionValues()); }
String getTokenSignature(OutputJobInfo outputJobInfo) { StringBuilder result = new StringBuilder(""); String dbName = outputJobInfo.getDatabaseName(); if (dbName != null) { result.append(dbName); } String tableName = outputJobInfo.getTableName(); if (tableName != null) { result.append("." + tableName); } Map<String, String> partValues = outputJobInfo.getPartitionValues(); if (partValues != null) { for (Entry<String, String> entry : partValues.entrySet()) { result.append("/"); result.append(entry.getKey()); result.append("="); result.append(entry.getValue()); } } return result.toString(); }
String getTokenSignature(OutputJobInfo outputJobInfo) { StringBuilder result = new StringBuilder(""); String dbName = outputJobInfo.getDatabaseName(); if (dbName != null) { result.append(dbName); } String tableName = outputJobInfo.getTableName(); if (tableName != null) { result.append("." + tableName); } Map<String, String> partValues = outputJobInfo.getPartitionValues(); if (partValues != null) { for (Entry<String, String> entry : partValues.entrySet()) { result.append("/"); result.append(entry.getKey()); result.append("="); result.append(entry.getValue()); } } return result.toString(); }
String getTokenSignature(OutputJobInfo outputJobInfo) { StringBuilder result = new StringBuilder(""); String dbName = outputJobInfo.getDatabaseName(); if (dbName != null) { result.append(dbName); } String tableName = outputJobInfo.getTableName(); if (tableName != null) { result.append("." + tableName); } Map<String, String> partValues = outputJobInfo.getPartitionValues(); if (partValues != null) { for (Entry<String, String> entry : partValues.entrySet()) { result.append("/"); result.append(entry.getKey()); result.append("="); result.append(entry.getValue()); } } return result.toString(); }
String getTokenSignature(OutputJobInfo outputJobInfo) { StringBuilder result = new StringBuilder(""); String dbName = outputJobInfo.getDatabaseName(); if (dbName != null) { result.append(dbName); } String tableName = outputJobInfo.getTableName(); if (tableName != null) { result.append("." + tableName); } Map<String, String> partValues = outputJobInfo.getPartitionValues(); if (partValues != null) { for (Entry<String, String> entry : partValues.entrySet()) { result.append("/"); result.append(entry.getKey()); result.append("="); result.append(entry.getValue()); } } return result.toString(); }
@Override public int hashCode() { return Objects.hashCode(info.getDatabaseName(), info.getTableName(), info.getPartitionValues()); }
@Override public <T> SourceTarget<T> asSourceTarget(PType<T> ptype) { if (acceptType(ptype)) return (SourceTarget<T>) new HCatSourceTarget(info.getDatabaseName(), info.getTableName()); return null; }
private Table getHiveTable(Configuration conf) throws IOException, TException { if (hiveTableCached != null) { return hiveTableCached; } IMetaStoreClient hiveMetastoreClient = HCatUtil.getHiveMetastoreClient(new HiveConf(conf, HCatTarget.class)); hiveTableCached = HCatUtil.getTable(hiveMetastoreClient, info.getDatabaseName(), info.getTableName()); return hiveTableCached; } }
mytableProperties.setProperty( org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, outputJobInfo.getDatabaseName()+ "." + outputJobInfo.getTableName());
mytableProperties.setProperty( org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, outputJobInfo.getDatabaseName()+ "." + outputJobInfo.getTableName());
mytableProperties.setProperty( org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, outputJobInfo.getDatabaseName()+ "." + outputJobInfo.getTableName());
mytableProperties.setProperty( org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, outputJobInfo.getDatabaseName()+ "." + outputJobInfo.getTableName());
table, outputInfo.getPartitionValues()); List<String> currentParts = client.listPartitionNames(outputInfo.getDatabaseName(), outputInfo.getTableName(), partitionValues, (short) 1);
table, outputInfo.getPartitionValues()); List<String> currentParts = client.listPartitionNames(outputInfo.getDatabaseName(), outputInfo.getTableName(), partitionValues, (short) 1);
table, outputInfo.getPartitionValues()); List<String> currentParts = client.listPartitionNames(outputInfo.getDatabaseName(), outputInfo.getTableName(), partitionValues, (short) 1);