@Override public List<TCell> getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map<ByteBuffer, ByteBuffer> attributes) throws IOError { byte [][] famAndQf = CellUtil.parseColumn(getBytes(column)); if (famAndQf.length == 1) { return getVerTs(tableName, row, famAndQf[0], null, timestamp, numVersions, attributes); } if (famAndQf.length == 2) { return getVerTs(tableName, row, famAndQf[0], famAndQf[1], timestamp, numVersions, attributes); } throw new IllegalArgumentException("Invalid familyAndQualifier provided."); }
@Override public List<TCell> getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map<ByteBuffer, ByteBuffer> attributes) throws IOError { byte [][] famAndQf = CellUtil.parseColumn(getBytes(column)); if (famAndQf.length == 1) { return getVerTs(tableName, row, famAndQf[0], null, timestamp, numVersions, attributes); } if (famAndQf.length == 2) { return getVerTs(tableName, row, famAndQf[0], famAndQf[1], timestamp, numVersions, attributes); } throw new IllegalArgumentException("Invalid familyAndQualifier provided."); }
@Deprecated @Override public List<TCell> getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map<ByteBuffer, ByteBuffer> attributes) throws IOError { byte [][] famAndQf = KeyValue.parseColumn(getBytes(column)); if(famAndQf.length == 1) { return getVerTs(tableName, row, famAndQf[0], new byte[0], timestamp, numVersions, attributes); } return getVerTs(tableName, row, famAndQf[0], famAndQf[1], timestamp, numVersions, attributes); }
assertEquals(2, handler.getVerTs(tableAname, rowAname, columnBname, time2, MAXVERSIONS, null).size()); assertEquals(1, handler.getVerTs(tableAname, rowAname, columnBname, time1, MAXVERSIONS, null).size()); int size = handler.getVerTs(tableAname, rowAname, columnBname, time1, MAXVERSIONS, null).size(); assertEquals(0, size); size = handler.getVerTs(tableAname, rowAname, columnBname, time2, MAXVERSIONS, null).size(); assertEquals(1, size);
assertEquals(2, handler.getVerTs(tableAname, rowAname, columnBname, time2, MAXVERSIONS, null).size()); assertEquals(1, handler.getVerTs(tableAname, rowAname, columnBname, time1, MAXVERSIONS, null).size()); int size = handler.getVerTs(tableAname, rowAname, columnBname, time1, MAXVERSIONS, null).size(); assertEquals(0, size); size = handler.getVerTs(tableAname, rowAname, columnBname, time2, MAXVERSIONS, null).size(); assertEquals(1, size);