Repository: phoenix Updated Branches: refs/heads/4.x-HBase-0.98 998e35f77 -> 192c0aca5 refs/heads/4.x-HBase-1.0 33961684d -> fde2878dc
PHOENIX-2216 : Support single mapper pass to CSV bulk load table and indexes - missing import Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/192c0aca Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/192c0aca Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/192c0aca Branch: refs/heads/4.x-HBase-0.98 Commit: 192c0aca574c349eee7da7dbee4cbf0f4b449a3f Parents: 998e35f Author: Ravi Magham <[email protected]> Authored: Sun Oct 18 10:06:58 2015 -0700 Committer: Ravi Magham <[email protected]> Committed: Sun Oct 18 10:06:58 2015 -0700 ---------------------------------------------------------------------- .../org/apache/phoenix/mapreduce/MultiHfileOutputFormat.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/192c0aca/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/MultiHfileOutputFormat.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/MultiHfileOutputFormat.java b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/MultiHfileOutputFormat.java index eae58ad..5f8d2d2 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/MultiHfileOutputFormat.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/mapreduce/MultiHfileOutputFormat.java @@ -41,7 +41,6 @@ import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.KeyValueUtil; import org.apache.hadoop.hbase.client.HTable; -import org.apache.hadoop.hbase.client.RegionLocator; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.io.compress.Compression; import org.apache.hadoop.hbase.io.compress.Compression.Algorithm; @@ -662,7 +661,7 @@ public class MultiHfileOutputFormat extends FileOutputFormat<CsvTableRowkeyPair, for(TargetTableRef table : tablesToBeLoaded) { final String tableName = table.getPhysicalName(); try(HTable htable = new HTable(conf,tableName);){ - Set<CsvTableRowkeyPair> startKeys = getRegionStartKeys(tableName , htable.getRegionLocator()); + Set<CsvTableRowkeyPair> startKeys = getRegionStartKeys(tableName , htable); tablesStartKeys.addAll(startKeys); String compressionConfig = configureCompression(htable.getTableDescriptor()); String bloomTypeConfig = configureBloomType(htable.getTableDescriptor()); @@ -704,7 +703,7 @@ public class MultiHfileOutputFormat extends FileOutputFormat<CsvTableRowkeyPair, * Return the start keys of all of the regions in this table, * as a list of ImmutableBytesWritable. */ - private static Set<CsvTableRowkeyPair> getRegionStartKeys(String tableName , RegionLocator table) throws IOException { + private static Set<CsvTableRowkeyPair> getRegionStartKeys(String tableName , HTable table) throws IOException { byte[][] byteKeys = table.getStartKeys(); Set<CsvTableRowkeyPair> ret = new TreeSet<CsvTableRowkeyPair>(); for (byte[] byteKey : byteKeys) {
