private void printRow(TRowResult rowResult) { // copy values into a TreeMap to get them in sorted order TreeMap<String, TCell> sorted = new TreeMap<>(); for (Map.Entry<ByteBuffer, TCell> column : rowResult.columns.entrySet()) { sorted.put(utf8(column.getKey().array()), column.getValue()); } StringBuilder rowStr = new StringBuilder(); for (SortedMap.Entry<String, TCell> entry : sorted.entrySet()) { rowStr.append(entry.getKey()); rowStr.append(" => "); rowStr.append(utf8(entry.getValue().value.array())); rowStr.append("; "); } System.out.println("row: " + utf8(rowResult.row.array()) + ", cols: " + rowStr); }
System.out.println(" found: " + utf8(name.array())); if (utf8(name.array()).equals(utf8(t))) { if (client.isTableEnabled(name)) { System.out.println(" disabling table: " + utf8(name.array())); client.disableTable(name); System.out.println(" deleting table: " + utf8(name.array())); client.deleteTable(name); columns.add(col); System.out.println("creating table: " + utf8(t)); try { client.createTable(ByteBuffer.wrap(t), columns); System.out.println("column families in " + utf8(t) + ": "); Map<ByteBuffer, ColumnDescriptor> columnMap = client.getColumnDescriptors(ByteBuffer.wrap(t)); for (ColumnDescriptor col2 : columnMap.values()) { System.out.println(" column: " + utf8(col2.name.array()) + ", maxVer: " + Integer.toString(col2.maxVersions));
private void printRow(TRowResult rowResult) { // copy values into a TreeMap to get them in sorted order TreeMap<String, TCell> sorted = new TreeMap<>(); for (Map.Entry<ByteBuffer, TCell> column : rowResult.columns.entrySet()) { sorted.put(utf8(column.getKey().array()), column.getValue()); } StringBuilder rowStr = new StringBuilder(); for (SortedMap.Entry<String, TCell> entry : sorted.entrySet()) { rowStr.append(entry.getKey()); rowStr.append(" => "); rowStr.append(utf8(entry.getValue().value.array())); rowStr.append("; "); } System.out.println("row: " + utf8(rowResult.row.array()) + ", cols: " + rowStr); }
System.out.println(" found: " + utf8(name.array())); if (utf8(name.array()).equals(utf8(t))) { if (client.isTableEnabled(name)) { System.out.println(" disabling table: " + utf8(name.array())); client.disableTable(name); System.out.println(" deleting table: " + utf8(name.array())); client.deleteTable(name); columns.add(col); System.out.println("creating table: " + utf8(t)); try { client.createTable(ByteBuffer.wrap(t), columns); System.out.println("column families in " + utf8(t) + ": "); Map<ByteBuffer, ColumnDescriptor> columnMap = client.getColumnDescriptors(ByteBuffer.wrap(t)); for (ColumnDescriptor col2 : columnMap.values()) { System.out.println(" column: " + utf8(col2.name.array()) + ", maxVer: " + Integer.toString(col2.maxVersions));