39 | | System.out.println("Scan the Table [" + tablename |
40 | | + "]'s Column => " + family + ":" + column); |
41 | | int i = 1; |
42 | | for (Result rowResult : scanner) { |
43 | | byte[] by = rowResult.getValue(Bytes.toBytes(family), Bytes |
44 | | .toBytes(column)); |
45 | | String str = Bytes.toString(by); |
46 | | System.out.println("row " + i + " is \"" + str + "\""); |
47 | | i++; |
48 | | } |
49 | | } catch (IOException e) { |
50 | | e.printStackTrace(); |
51 | | } |
52 | | } |
| 40 | System.out.println("Scan the Table [" + tablename |
| 41 | + "]'s Column => " + family + ":" + column); |
| 42 | int i = 1; |
| 43 | for (Result rowResult : scanner) { |
| 44 | byte[] by = rowResult.getValue(Bytes.toBytes(family), Bytes |
| 45 | .toBytes(column)); |
| 46 | String str = Bytes.toString(by); |
| 47 | System.out.println("row " + i + " is \"" + str + "\""); |
| 48 | i++; |
| 49 | } |
| 50 | } catch (IOException e) { |
| 51 | e.printStackTrace(); |
| 52 | } |
| 53 | } |
54 | | public static void main(String[] argv) { |
55 | | String[] args = new GenericOptionsParser(new Configuration(), argv) |
56 | | .getRemainingArgs(); |
57 | | if (args.length < 3) { |
58 | | System.out |
59 | | .println("ScanColumn <TableName> <Family> <Qualifier> "); |
60 | | return; |
61 | | } |
62 | | ScanColumn(args[0], args[1], args[2]); |
63 | | } |
| 55 | public static void main(String[] argv) { |
| 56 | |
| 57 | // eclipse only |
| 58 | // String[] argt = {"ex1Table", "Detail", "c1"}; |
| 59 | // argv = argt; |
| 60 | |
| 61 | String[] args = new GenericOptionsParser(new Configuration(), argv) |
| 62 | .getRemainingArgs(); |
| 63 | if (args.length < 3) { |
| 64 | System.out |
| 65 | .println("ScanColumn <TableName> <Family> <Qualifier> "); |
| 66 | return; |
| 67 | } |
| 68 | ScanColumn(args[0], args[1], args[2]); |
| 69 | } |