diff --git a/CHANGES.txt b/CHANGES.txt index 50737e88da5..51b8799551f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -294,6 +294,7 @@ Release 0.90.4 - Unreleased sun jre provided by RHEL6 (Roman Shaposhnik) HBASE-3920 HLog hbase.regionserver.flushlogentries no longer supported (Dave Latham) + HBASE-3919 More places output binary data to text (Dave Latham) Release 0.90.3 - May 19th, 2011 diff --git a/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java b/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java index 01da5bb8a31..47dfc428e59 100644 --- a/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java +++ b/src/main/java/org/apache/hadoop/hbase/catalog/CatalogTracker.java @@ -470,7 +470,7 @@ public class CatalogTracker { throw e; } } - LOG.info("Failed verification of " + Bytes.toString(regionName) + + LOG.info("Failed verification of " + Bytes.toStringBinary(regionName) + " at address=" + address + "; " + t); return false; } diff --git a/src/main/java/org/apache/hadoop/hbase/catalog/MetaEditor.java b/src/main/java/org/apache/hadoop/hbase/catalog/MetaEditor.java index 5d616078e60..a25b0f05a36 100644 --- a/src/main/java/org/apache/hadoop/hbase/catalog/MetaEditor.java +++ b/src/main/java/org/apache/hadoop/hbase/catalog/MetaEditor.java @@ -162,7 +162,7 @@ public class MetaEditor { addLocation(put, sn); server.put(catalogRegionName, put); LOG.info("Updated row " + regionInfo.getRegionNameAsString() + - " in region " + Bytes.toString(catalogRegionName) + " with " + + " in region " + Bytes.toStringBinary(catalogRegionName) + " with " + "serverName=" + sn.toString()); } @@ -199,7 +199,7 @@ public class MetaEditor { catalogTracker.waitForMetaServerConnectionDefault(). delete(CatalogTracker.META_REGION, delete); LOG.info("Deleted daughter reference " + daughter.getRegionNameAsString() + - ", qualifier=" + Bytes.toString(qualifier) + ", from parent " + + ", qualifier=" + Bytes.toStringBinary(qualifier) + ", from parent " + parent.getRegionNameAsString()); } diff --git a/src/main/java/org/apache/hadoop/hbase/client/Delete.java b/src/main/java/org/apache/hadoop/hbase/client/Delete.java index 54f2244505a..52cdc670756 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Delete.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Delete.java @@ -290,7 +290,7 @@ public class Delete implements Writable, Row, Comparable { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("row="); - sb.append(Bytes.toString(this.row)); + sb.append(Bytes.toStringBinary(this.row)); sb.append(", ts="); sb.append(this.ts); sb.append(", families={"); diff --git a/src/main/java/org/apache/hadoop/hbase/client/Get.java b/src/main/java/org/apache/hadoop/hbase/client/Get.java index 05479337a78..b91454791ac 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Get.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Get.java @@ -306,7 +306,7 @@ public class Get implements Writable, Row, Comparable { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("row="); - sb.append(Bytes.toString(this.row)); + sb.append(Bytes.toStringBinary(this.row)); sb.append(", maxVersions="); sb.append("").append(this.maxVersions); sb.append(", cacheBlocks="); @@ -342,7 +342,7 @@ public class Get implements Writable, Row, Comparable { } else { moreThanOneB = true; } - sb.append(Bytes.toString(column)); + sb.append(Bytes.toStringBinary(column)); } sb.append("}"); } diff --git a/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java b/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java index 0f478473db5..3c1bcb38540 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java +++ b/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java @@ -766,7 +766,7 @@ public class HBaseAdmin implements Abortable, Closeable { Pair pair = MetaReader.getRegion(ct, regionname); if (pair == null || pair.getSecond() == null) { LOG.info("No server in .META. for " + - Bytes.toString(regionname) + "; pair=" + pair); + Bytes.toStringBinary(regionname) + "; pair=" + pair); } else { closeRegion(pair.getSecond(), pair.getFirst()); } @@ -774,7 +774,7 @@ public class HBaseAdmin implements Abortable, Closeable { Pair pair = MetaReader.getRegion(ct, regionname); if (pair == null || pair.getSecond() == null) { LOG.info("No server in .META. for " + - Bytes.toString(regionname) + "; pair=" + pair); + Bytes.toStringBinary(regionname) + "; pair=" + pair); } else { closeRegion(pair.getSecond(), pair.getFirst()); } @@ -823,7 +823,7 @@ public class HBaseAdmin implements Abortable, Closeable { MetaReader.getRegion(ct, tableNameOrRegionName); if (pair == null || pair.getSecond() == null) { LOG.info("No server in .META. for " + - Bytes.toString(tableNameOrRegionName) + "; pair=" + pair); + Bytes.toStringBinary(tableNameOrRegionName) + "; pair=" + pair); } else { flush(pair.getSecond(), pair.getFirst()); } @@ -926,7 +926,7 @@ public class HBaseAdmin implements Abortable, Closeable { MetaReader.getRegion(ct, tableNameOrRegionName); if (pair == null || pair.getSecond() == null) { LOG.info("No server in .META. for " + - Bytes.toString(tableNameOrRegionName) + "; pair=" + pair); + Bytes.toStringBinary(tableNameOrRegionName) + "; pair=" + pair); } else { compact(pair.getSecond(), pair.getFirst(), major); } @@ -1082,7 +1082,7 @@ public class HBaseAdmin implements Abortable, Closeable { MetaReader.getRegion(ct, tableNameOrRegionName); if (pair == null || pair.getSecond() == null) { LOG.info("No server in .META. for " + - Bytes.toString(tableNameOrRegionName) + "; pair=" + pair); + Bytes.toStringBinary(tableNameOrRegionName) + "; pair=" + pair); } else { split(pair.getSecond(), pair.getFirst(), splitPoint); } diff --git a/src/main/java/org/apache/hadoop/hbase/client/Increment.java b/src/main/java/org/apache/hadoop/hbase/client/Increment.java index 17c787025a7..59b02148dcd 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Increment.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Increment.java @@ -225,7 +225,7 @@ public class Increment implements Writable { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("row="); - sb.append(Bytes.toString(this.row)); + sb.append(Bytes.toStringBinary(this.row)); if(this.familyMap.size() == 0) { sb.append(", no columns set to be incremented"); return sb.toString(); @@ -254,7 +254,7 @@ public class Increment implements Writable { } else { moreThanOneB = true; } - sb.append(Bytes.toString(column.getKey()) + "+=" + column.getValue()); + sb.append(Bytes.toStringBinary(column.getKey()) + "+=" + column.getValue()); } sb.append("}"); } diff --git a/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java b/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java index cfe6a50fd89..2734f3098be 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java +++ b/src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java @@ -155,13 +155,13 @@ public class MetaScanner { HConstants.CATALOG_FAMILY); if (startRowResult == null) { throw new TableNotFoundException("Cannot find row in .META. for table: " - + Bytes.toString(tableName) + ", row=" + Bytes.toString(searchRow)); + + Bytes.toString(tableName) + ", row=" + Bytes.toStringBinary(searchRow)); } byte[] value = startRowResult.getValue(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER); if (value == null || value.length == 0) { throw new IOException("HRegionInfo was null or empty in Meta for " + - Bytes.toString(tableName) + ", row=" + Bytes.toString(searchRow)); + Bytes.toString(tableName) + ", row=" + Bytes.toStringBinary(searchRow)); } HRegionInfo regionInfo = Writables.getHRegionInfo(value); @@ -186,7 +186,7 @@ public class MetaScanner { final Scan scan = new Scan(startRow).addFamily(HConstants.CATALOG_FAMILY); if (LOG.isDebugEnabled()) { LOG.debug("Scanning " + Bytes.toString(metaTableName) + - " starting at row=" + Bytes.toString(startRow) + " for max=" + + " starting at row=" + Bytes.toStringBinary(startRow) + " for max=" + rowUpperLimit + " rows"); } callable = new ScannerCallable(connection, metaTableName, scan); diff --git a/src/main/java/org/apache/hadoop/hbase/client/Put.java b/src/main/java/org/apache/hadoop/hbase/client/Put.java index 2479b8001fb..0cfbfa8a73e 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Put.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Put.java @@ -414,7 +414,7 @@ public class Put implements HeapSize, Writable, Row, Comparable { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("row="); - sb.append(Bytes.toString(this.row)); + sb.append(Bytes.toStringBinary(this.row)); sb.append(", families={"); boolean moreThanOne = false; for(Map.Entry> entry : this.familyMap.entrySet()) { diff --git a/src/main/java/org/apache/hadoop/hbase/client/Result.java b/src/main/java/org/apache/hadoop/hbase/client/Result.java index 2a2dbaacb5c..c1269efcff1 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/Result.java +++ b/src/main/java/org/apache/hadoop/hbase/client/Result.java @@ -664,7 +664,7 @@ public class Result implements Writable, WritableWithSize { throws Exception { if (res2 == null) { throw new Exception("There wasn't enough rows, we stopped at " - + Bytes.toString(res1.getRow())); + + Bytes.toStringBinary(res1.getRow())); } if (res1.size() != res2.size()) { throw new Exception("This row doesn't have the same number of KVs: " diff --git a/src/main/java/org/apache/hadoop/hbase/executor/RegionTransitionData.java b/src/main/java/org/apache/hadoop/hbase/executor/RegionTransitionData.java index 1dc614471b9..b537c3733f8 100644 --- a/src/main/java/org/apache/hadoop/hbase/executor/RegionTransitionData.java +++ b/src/main/java/org/apache/hadoop/hbase/executor/RegionTransitionData.java @@ -246,4 +246,4 @@ public class RegionTransitionData implements Writable { return "region=" + Bytes.toStringBinary(regionName) + ", origin=" + this.origin + ", state=" + eventType; } -} +} \ No newline at end of file diff --git a/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java b/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java index 224d3d204a0..c46e22e324c 100644 --- a/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java +++ b/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java @@ -258,7 +258,7 @@ public class HalfStoreFileReader extends StoreFile.Reader { return Bytes.toBytes(scanner.getKey()); } } catch (IOException e) { - LOG.warn("Failed seekBefore " + Bytes.toString(this.splitkey), e); + LOG.warn("Failed seekBefore " + Bytes.toStringBinary(this.splitkey), e); } return null; } diff --git a/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java b/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java index 0cda76e072b..a7524cb95aa 100644 --- a/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java +++ b/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java @@ -101,7 +101,7 @@ implements Configurable { if (this.lastReduces != reduces) { this.splits = Bytes.split(this.startkey, this.endkey, reduces - 1); for (int i = 0; i < splits.length; i++) { - LOG.info(Bytes.toString(splits[i])); + LOG.info(Bytes.toStringBinary(splits[i])); } } int pos = Bytes.binarySearch(this.splits, key.get(), key.getOffset(), diff --git a/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index f1d06d03bcb..b8489ac1915 100644 --- a/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -822,7 +822,7 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server { Pair p = this.assignmentManager.getAssignment(encodedRegionName); if (p == null) - throw new UnknownRegionException(Bytes.toString(encodedRegionName)); + throw new UnknownRegionException(Bytes.toStringBinary(encodedRegionName)); HRegionInfo hri = p.getFirst(); ServerName dest = null; if (destServerName == null || destServerName.length == 0) { @@ -917,14 +917,14 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server { if (newRegions.length == 1) { this.assignmentManager.assign(newRegions[0], true); } else { - // 5. Trigger immediate assignment of the regions in round-robin fashion - List servers = serverManager.getOnlineServersList(); - try { - this.assignmentManager.assignUserRegions(Arrays.asList(newRegions), servers); - } catch (InterruptedException ie) { - LOG.error("Caught " + ie + " during round-robin assignment"); - throw new IOException(ie); - } + // 5. Trigger immediate assignment of the regions in round-robin fashion + List servers = serverManager.getOnlineServersList(); + try { + this.assignmentManager.assignUserRegions(Arrays.asList(newRegions), servers); + } catch (InterruptedException ie) { + LOG.error("Caught " + ie + " during round-robin assignment"); + throw new IOException(ie); + } } // 6. If sync, wait for assignment of regions @@ -1295,7 +1295,7 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server { } Pair pair = MetaReader.getRegion(this.catalogTracker, regionName); - if (pair == null) throw new UnknownRegionException(Bytes.toString(regionName)); + if (pair == null) throw new UnknownRegionException(Bytes.toStringBinary(regionName)); HRegionInfo hri = pair.getFirst(); if (force) this.assignmentManager.clearRegionFromTransition(hri); this.assignmentManager.unassign(hri, force); diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java index 3e7d1da7e05..e5bd154ebed 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -3054,8 +3054,8 @@ public class HRegion implements HeapSize { // , Writable{ LOG.info("starting merge of regions: " + a + " and " + b + " into new region " + newRegionInfo.toString() + - " with start key <" + Bytes.toString(startKey) + "> and end key <" + - Bytes.toString(endKey) + ">"); + " with start key <" + Bytes.toStringBinary(startKey) + "> and end key <" + + Bytes.toStringBinary(endKey) + ">"); // Move HStoreFiles under new region directory Map> byFamily = @@ -3494,7 +3494,7 @@ public class HRegion implements HeapSize { // , Writable{ throws NoSuchColumnFamilyException { if(!regionInfo.getTableDesc().hasFamily(family)) { throw new NoSuchColumnFamilyException("Column family " + - Bytes.toString(family) + " does not exist in region " + this + Bytes.toStringBinary(family) + " does not exist in region " + this + " in table " + regionInfo.getTableDesc()); } } diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java b/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java index 213b2ab886b..c2d55429197 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/MemStoreFlusher.java @@ -404,7 +404,7 @@ class MemStoreFlusher extends Thread implements FlushRequester { return false; } catch (IOException ex) { LOG.error("Cache flush failed" + - (region != null ? (" for region " + Bytes.toString(region.getRegionName())) : ""), + (region != null ? (" for region " + Bytes.toStringBinary(region.getRegionName())) : ""), RemoteExceptionHandler.checkIOException(ex)); if (!server.checkFileSystem()) { return false; @@ -533,7 +533,7 @@ class MemStoreFlusher extends Thread implements FlushRequester { @Override public String toString() { - return "[flush region " + Bytes.toString(region.getRegionName()) + "]"; + return "[flush region " + Bytes.toStringBinary(region.getRegionName()) + "]"; } } } diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java b/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java index f4c57671c47..072fd8d6083 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java @@ -166,7 +166,7 @@ public class SplitTransaction { if (Bytes.equals(startKey, splitrow) || !this.parent.getRegionInfo().containsRow(splitrow)) { LOG.info("Split row is not inside region key range or is equal to " + - "startkey: " + Bytes.toString(this.splitrow)); + "startkey: " + Bytes.toStringBinary(this.splitrow)); return false; } long rid = getDaughterRegionIdTimestamp(hri); diff --git a/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java b/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java index 5f121a6c427..07167885cc7 100644 --- a/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java +++ b/src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java @@ -625,7 +625,7 @@ public class HLog implements Syncable { LOG.debug("Found " + logsToRemove + " hlogs to remove" + " out of total " + this.outputfiles.size() + ";" + " oldest outstanding sequenceid is " + oldestOutstandingSeqNum + - " from region " + Bytes.toString(oldestRegion)); + " from region " + Bytes.toStringBinary(oldestRegion)); } for (Long seq : sequenceNumbers) { archiveLogFile(this.outputfiles.remove(seq), seq); diff --git a/src/main/java/org/apache/hadoop/hbase/util/HMerge.java b/src/main/java/org/apache/hadoop/hbase/util/HMerge.java index 9a8c638e031..c07f8dcea9b 100644 --- a/src/main/java/org/apache/hadoop/hbase/util/HMerge.java +++ b/src/main/java/org/apache/hadoop/hbase/util/HMerge.java @@ -209,8 +209,8 @@ class HMerge { mergedRegion); break; } - LOG.info("not merging regions " + Bytes.toString(currentRegion.getRegionName()) - + " and " + Bytes.toString(nextRegion.getRegionName())); + LOG.info("not merging regions " + Bytes.toStringBinary(currentRegion.getRegionName()) + + " and " + Bytes.toStringBinary(nextRegion.getRegionName())); currentRegion.close(); currentRegion = nextRegion; currentSize = nextSize; @@ -282,7 +282,7 @@ class HMerge { Result currentRow = metaScanner.next(); boolean foundResult = false; while (currentRow != null) { - LOG.info("Row: <" + Bytes.toString(currentRow.getRow()) + ">"); + LOG.info("Row: <" + Bytes.toStringBinary(currentRow.getRow()) + ">"); byte[] regionInfoValue = currentRow.getValue(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER); if (regionInfoValue == null || regionInfoValue.length == 0) { @@ -324,7 +324,7 @@ class HMerge { Delete delete = new Delete(regionsToDelete[r]); table.delete(delete); if(LOG.isDebugEnabled()) { - LOG.debug("updated columns in row: " + Bytes.toString(regionsToDelete[r])); + LOG.debug("updated columns in row: " + Bytes.toStringBinary(regionsToDelete[r])); } } newRegion.getRegionInfo().setOffline(true); @@ -336,7 +336,7 @@ class HMerge { if(LOG.isDebugEnabled()) { LOG.debug("updated columns in row: " - + Bytes.toString(newRegion.getRegionName())); + + Bytes.toStringBinary(newRegion.getRegionName())); } } } @@ -417,7 +417,7 @@ class HMerge { root.delete(delete, null, true); if(LOG.isDebugEnabled()) { - LOG.debug("updated columns in row: " + Bytes.toString(regionsToDelete[r])); + LOG.debug("updated columns in row: " + Bytes.toStringBinary(regionsToDelete[r])); } } HRegionInfo newInfo = newRegion.getRegionInfo(); @@ -427,7 +427,7 @@ class HMerge { Writables.getBytes(newInfo)); root.put(put); if(LOG.isDebugEnabled()) { - LOG.debug("updated columns in row: " + Bytes.toString(newRegion.getRegionName())); + LOG.debug("updated columns in row: " + Bytes.toStringBinary(newRegion.getRegionName())); } } } diff --git a/src/main/java/org/apache/hadoop/hbase/util/Merge.java b/src/main/java/org/apache/hadoop/hbase/util/Merge.java index 4551982e720..de668612fbe 100644 --- a/src/main/java/org/apache/hadoop/hbase/util/Merge.java +++ b/src/main/java/org/apache/hadoop/hbase/util/Merge.java @@ -196,22 +196,22 @@ public class Merge extends Configured implements Tool { * Merges two regions from a user table. */ private void mergeTwoRegions() throws IOException { - LOG.info("Merging regions " + Bytes.toString(this.region1) + " and " + - Bytes.toString(this.region2) + " in table " + Bytes.toString(this.tableName)); + LOG.info("Merging regions " + Bytes.toStringBinary(this.region1) + " and " + + Bytes.toStringBinary(this.region2) + " in table " + Bytes.toString(this.tableName)); // Scan the root region for all the meta regions that contain the regions // we're merging. MetaScannerListener listener = new MetaScannerListener(region1, region2); this.utils.scanRootRegion(listener); HRegionInfo meta1 = listener.getMeta1(); if (meta1 == null) { - throw new IOException("Could not find meta region for " + Bytes.toString(region1)); + throw new IOException("Could not find meta region for " + Bytes.toStringBinary(region1)); } HRegionInfo meta2 = listener.getMeta2(); if (meta2 == null) { - throw new IOException("Could not find meta region for " + Bytes.toString(region2)); + throw new IOException("Could not find meta region for " + Bytes.toStringBinary(region2)); } - LOG.info("Found meta for region1 " + Bytes.toString(meta1.getRegionName()) + - ", meta for region2 " + Bytes.toString(meta2.getRegionName())); + LOG.info("Found meta for region1 " + Bytes.toStringBinary(meta1.getRegionName()) + + ", meta for region2 " + Bytes.toStringBinary(meta2.getRegionName())); HRegion metaRegion1 = this.utils.getMetaRegion(meta1); Get get = new Get(region1); get.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER); @@ -219,7 +219,7 @@ public class Merge extends Configured implements Tool { HRegionInfo info1 = Writables.getHRegionInfo((cells1 == null)? null: cells1.get(0).getValue()); if (info1== null) { throw new NullPointerException("info1 is null using key " + - Bytes.toString(region1) + " in " + meta1); + Bytes.toStringBinary(region1) + " in " + meta1); } HRegion metaRegion2; @@ -244,7 +244,7 @@ public class Merge extends Configured implements Tool { HRegionInfo mergedInfo = listener.getMeta1(); if (mergedInfo == null) { throw new IOException("Could not find meta region for " + - Bytes.toString(merged.getRegionName())); + Bytes.toStringBinary(merged.getRegionName())); } HRegion mergeMeta; if (Bytes.equals(mergedInfo.getRegionName(), meta1.getRegionName())) { @@ -271,12 +271,12 @@ public class Merge extends Configured implements Tool { HRegion meta2) throws IOException { if (info1 == null) { - throw new IOException("Could not find " + Bytes.toString(region1) + " in " + - Bytes.toString(meta1.getRegionName())); + throw new IOException("Could not find " + Bytes.toStringBinary(region1) + " in " + + Bytes.toStringBinary(meta1.getRegionName())); } if (info2 == null) { - throw new IOException("Cound not find " + Bytes.toString(region2) + " in " + - Bytes.toString(meta2.getRegionName())); + throw new IOException("Cound not find " + Bytes.toStringBinary(region2) + " in " + + Bytes.toStringBinary(meta2.getRegionName())); } HRegion merged = null; HLog log = utils.getLog(); @@ -361,7 +361,7 @@ public class Merge extends Configured implements Tool { private boolean notInTable(final byte [] tn, final byte [] rn) { if (WritableComparator.compareBytes(tn, 0, tn.length, rn, 0, tn.length) != 0) { - LOG.error("Region " + Bytes.toString(rn) + " does not belong to table " + + LOG.error("Region " + Bytes.toStringBinary(rn) + " does not belong to table " + Bytes.toString(tn)); return true; } diff --git a/src/main/java/org/apache/hadoop/hbase/util/MetaUtils.java b/src/main/java/org/apache/hadoop/hbase/util/MetaUtils.java index 10d6b922ca1..540d7df9ee0 100644 --- a/src/main/java/org/apache/hadoop/hbase/util/MetaUtils.java +++ b/src/main/java/org/apache/hadoop/hbase/util/MetaUtils.java @@ -225,7 +225,7 @@ public class MetaUtils { info = Writables.getHRegionInfoOrNull(kv.getValue()); if (info == null) { LOG.warn("Region info is null for row " + - Bytes.toString(kv.getRow()) + " in table " + + Bytes.toStringBinary(kv.getRow()) + " in table " + r.getTableDesc().getNameAsString()); } continue;