/** {@inheritDoc} */ @Override public String toString() { return getName(); }
/** {@inheritDoc} */ @Override public String toString() { return Objects.toStringHelper(FijiCell.class) .add("column", mColumn.getName()) .add("timestamp", mTimestamp) .add("encoding", getType()) .add("content", getData()) .toString(); }
/** * Initializes a new FijiCell. * * @param column Name of the column in which this cell exists. * @param timestamp Timestamp of this cell in milliseconds since the epoch. * @param decodedCell Decoded cell content. */ private FijiCell( final FijiColumnName column, final long timestamp, final DecodedCell<T> decodedCell ) { Preconditions.checkArgument(column.isFullyQualified(), "Cannot create a FijiCell without a fully qualified column. Found family: %s", column.getName()); mColumn = column; mTimestamp = timestamp; mDecodedCell = decodedCell; }
ImmutableList.Builder<String> builder = ImmutableList.builder(); for (FijiColumnName column : columns) { builder.add(column.getName());
/** * Helper function to write a column and its associated data. * * @param out DataOutput for the Hadoop Writable to write to. * @param fijiColumnName to write * @param data to write * @throws IOException if there was an issue. */ private void writeColumn(DataOutput out, FijiColumnName fijiColumnName, NavigableMap<Long, FijiCellWritable> data) throws IOException { WritableUtils.writeString(out, fijiColumnName.getName()); WritableUtils.writeVInt(out, data.size()); // number in the timeseries for (Map.Entry<Long, FijiCellWritable> cellEntry : data.entrySet()) { WritableUtils.writeVLong(out, cellEntry.getKey()); cellEntry.getValue().write(out); } }
/** * Sets the family. * * @param family The family. */ @HadoopConf(key=CONF_EXPORT_FAMILY) protected void setFamily(String family) { FijiColumnName name = new FijiColumnName(family); if (name.isFullyQualified()) { throw new RuntimeException("Expected an unqualified map type family. " + "Requested family was: " + name.getName()); } mFamily = family; }
if (!fijiCounterColumns.contains(fijiColumnName)) { sb.append(",") .append(fijiColumnName.getName()) .append("[0]");
WritableUtils.writeString(out, entry.getKey().getName()); WritableUtils.writeString(out, entry.getValue().toString());
/** {@inheritDoc} */ @Override public void produce(FijiRowData input, ProducerContext context) throws IOException { if (!input.containsColumn(getInputColumnName().getFamily(), getInputColumnName().getQualifier())) { LOG.debug("No " + getInputColumnName().getName() + " for entity: " + input.getEntityId()); } String string = input.getMostRecentValue(getInputColumnName().getFamily(), getInputColumnName().getQualifier()).toString(); // Run the regex on the input string. Matcher matcher = mPattern.matcher(string); if (matcher.matches()) { if (matcher.groupCount() == 1) { context.put(matcher.group(1)); } } else { LOG.debug(input.getEntityId().toString() + "'s data '" + string + "' does not match " + mPattern.pattern()); } } }
continue; LOG.debug("Adding family [{}] to getMap() result.", fijiColumnName.getName());
encoderMap.put(column.getName(), encoder);