in modules/core/src/main/java/org/apache/fluo/core/util/SpanUtil.java [50:68]
public static Key toKey(RowColumn rc) {
if ((rc == null) || (rc.getRow().equals(Bytes.EMPTY))) {
return null;
}
Text row = ByteUtil.toText(rc.getRow());
if ((rc.getColumn().equals(Column.EMPTY)) || !rc.getColumn().isFamilySet()) {
return new Key(row);
}
Text cf = ByteUtil.toText(rc.getColumn().getFamily());
if (!rc.getColumn().isQualifierSet()) {
return new Key(row, cf);
}
Text cq = ByteUtil.toText(rc.getColumn().getQualifier());
if (!rc.getColumn().isVisibilitySet()) {
return new Key(row, cf, cq);
}
Text cv = ByteUtil.toText(rc.getColumn().getVisibility());
return new Key(row, cf, cq, cv);
}