/** * Prints the contents of a single fiji cell to the printstream. * * @param entityId The entity id. * @param timestamp This timestamp of a FijiCell. * @param family The family of a FijiCell. * @param qualifier The qualifier of a FijiCell. * @param cellData The contents of a FijiCell. * @param printStream The stream to print to. */ private static void printCell(EntityId entityId, Long timestamp, String family, String qualifier, Object cellData, PrintStream printStream) { printStream.printf("entity-id=%s [%d] %s:%s%n %s%n", formatEntityId(entityId), timestamp, family, qualifier, cellData); }
/** * Prints the data for a single entity id. * * @param reader The reader. * @param request The data request. * @param entityId The entity id to lookup. * @param mapTypeFamilies The map type families to print. * @param groupTypeColumns The group type columns to print. * @return A program exit code (zero on success). */ private int lookup( FijiTableReader reader, FijiDataRequest request, EntityId entityId, Map<FamilyLayout, List<String>> mapTypeFamilies, Map<FamilyLayout, List<ColumnLayout>> groupTypeColumns) { try { final FijiRowData row = reader.get(entityId, request); if (hasVerboseDebug() && (!ToolUtils.formatEntityId(entityId).startsWith("hbase="))) { getPrintStream().printf("entity-id=%s%s%n", ToolUtils.HBASE_ROW_KEY_SPEC_PREFIX, Bytes.toStringBinary((entityId.getHBaseRowKey()))); } ToolUtils.printRow(row, mapTypeFamilies, groupTypeColumns, getPrintStream()); } catch (IOException ioe) { LOG.error(ioe.getMessage()); return FAILURE; } return SUCCESS; }
/** * Prints the contents of a single fiji cell to the printstream. * * @param entityId The entity id. * @param cell The FijiCell. * @param printStream The stream to print to. */ private static void printCell(EntityId entityId, FijiCell<?> cell, PrintStream printStream) { printStream.printf("entity-id=%s [%d] %s:%s%n %s%n", formatEntityId(entityId), cell.getTimestamp(), cell.getColumn().getFamily(), cell.getColumn().getQualifier(), cell.getData()); }
"Looking up entity: " + ToolUtils.formatEntityId(entityId) + " from fiji table: " + argURI); return lookup(reader, request, entityId, mapTypeFamilies, groupTypeColumns);