/** * Retrieves Row in RowColumn as a String using UTF-8 encoding. * * @return Row */ public String getsRow() { return row.toString(); }
/** * Retrieves Row in RowColumn as a String using UTF-8 encoding. * * @return Row */ public String getsRow() { return row.toString(); }
/** * Retrieves Row in RowColumn as a String using UTF-8 encoding. * * @return Row */ public String getsRow() { return row.toString(); }
/** * Given a Byte row, return the query node Id * @param row - the Byte row used to identify the BatchInformation * @return - the queryId that the batch task is performed on */ public static String getNodeId(Bytes row) { String[] stringArray = row.toString().split(IncrementalUpdateConstants.NODEID_BS_DELIM);; Preconditions.checkArgument(stringArray.length == 2); return stringArray[0]; }
/** * Given a Byte row, return the query node Id * @param row - the Byte row used to identify the BatchInformation * @return - the queryId that the batch task is performed on */ public static String getNodeId(Bytes row) { String[] stringArray = row.toString().split(IncrementalUpdateConstants.NODEID_BS_DELIM);; Preconditions.checkArgument(stringArray.length == 2); return stringArray[0]; }
@Override public Map<String, Map<Column, String>> gets(Collection<? extends CharSequence> rows, Set<Column> columns) { Map<Bytes, Map<Column, Bytes>> rcvs = get(Collections2.transform(rows, this::s2bConv), columns); Map<String, Map<Column, String>> ret = new HashMap<>(rcvs.size()); for (Entry<Bytes, Map<Column, Bytes>> entry : rcvs.entrySet()) { ret.put(entry.getKey().toString(), Maps.transformValues(entry.getValue(), b -> b.toString())); } return ret; }
/** * Get the column family as a string using UTF-8 encoding. */ public String getsFamily() { return getFamily().toString(); }
/** * Get the column family as a string using UTF-8 encoding. */ public String getsQualifier() { return getQualifier().toString(); }
/** * Get the column visibility as a string using UTF-8 encoding. */ public String getsVisibility() { return getVisibility().toString(); }
/** * Get the column visibility as a string using UTF-8 encoding. */ public String getsVisibility() { return getVisibility().toString(); }
@Override public String getsRow() { return getRow().toString(); } }
/** * Get the column family as a string using UTF-8 encoding. */ public String getsFamily() { return getFamily().toString(); }
/** * Get the column family as a string using UTF-8 encoding. */ public String getsQualifier() { return getQualifier().toString(); }
public static void fetchFamilies(Job job, Bytes... fams) { // TODO support binary data String[] sfams = new String[fams.length]; for (int i = 0; i < sfams.length; i++) { sfams[i] = fams[i].toString(); } fetchFamilies(job, sfams); }
@Override public Map<RowColumn, String> gets(Collection<RowColumn> rowColumns) { Map<RowColumn, Bytes> bytesMap = get(rowColumns); return Maps.transformValues(bytesMap, b -> b.toString()); }
public static void fetchFamilies(Job job, Bytes... fams) { // TODO support binary data String[] sfams = new String[fams.length]; for (int i = 0; i < sfams.length; i++) { sfams[i] = fams[i].toString(); } fetchFamilies(job, sfams); }
@Override public Map<Column, String> gets(CharSequence row, Set<Column> columns) { Map<Column, Bytes> values = get(s2bConv(row), columns); return Maps.transformValues(values, b -> b.toString()); }
@Override public Map<Column, String> gets(CharSequence row, Set<Column> columns) { Map<Column, Bytes> values = get(s2bConv(row), columns); return Maps.transformValues(values, b -> b.toString()); }
@Override public String gets(CharSequence row, Column column) { Bytes val = get(s2bConv(row), column); if (val == null) { return null; } return val.toString(); }
@Override public String gets(CharSequence row, Column column, String defaultValue) { Bytes val = get(s2bConv(row), column); if (val == null) { return defaultValue; } return val.toString(); }