/** {@inheritDoc} */ @Override public FijiURI getURI() { return mTable.getURI(); }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (null == obj) { return false; } if (obj == this) { return true; } if (!getClass().equals(obj.getClass())) { return false; } final FijiTable other = (FijiTable) obj; // Equal if the two tables have the same URI: return mTableURI.equals(other.getURI()); }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (null == obj) { return false; } if (obj == this) { return true; } if (!getClass().equals(obj.getClass())) { return false; } final FijiTable other = (FijiTable) obj; // Equal if the two tables have the same URI: return mTableURI.equals(other.getURI()); }
if (mayProceed("Are you sure you want to delete all cells with timestamp <= %d" + " from row '%s' in table '%s'?", timestamp, entityId, table.getURI())) { writer.deleteRow(entityId, timestamp); entityId, table.getURI())) { writer.deleteRow(entityId); if (!mayProceed("Are you sure you want to delete cell with timestamp %d of columns %s " + "from row '%s' in table '%s'?", timestamp, Joiner.on(",").join(columns), entityId, table.getURI())) { return SUCCESS; if (!mayProceed("Are you sure you want to delete the most recent cells of columns %s " + "from row '%s' in table '%s'?", timestamp, Joiner.on(",").join(columns), entityId, table.getURI())) { return SUCCESS; if (!mayProceed("Are you sure you want to delete all cells of columns %s " + "with timestamp <= %d from row '%s' in table '%s'?", Joiner.on(",").join(columns), timestamp, entityId, table.getURI())) { return SUCCESS; Joiner.on(",").join(columns), entityId, table.getURI())) { return SUCCESS;
/** * Runs the email domain count gather job to generate a map from email domain to popularity. * * @param table The input fiji table of users. * @param outputPath The output path for the map from email domains to their popularity. * @param numSplits The number of output file shards to write. * @return Whether the job was successful. * @throws Exception If there is an exception. */ private boolean countEmailDomainPopularity(FijiTable table, Path outputPath, int numSplits) throws Exception { LOG.info("Configuring a gather job..."); FijiGatherJobBuilder jobBuilder = FijiGatherJobBuilder.create() .withInputTable(table.getURI()) .withGatherer(EmailDomainCountGatherer.class) .withCombiner(IntSumReducer.class) .withReducer(IntSumReducer.class) .withOutput(MapReduceJobOutputs.newSequenceFileMapReduceJobOutput(outputPath, numSplits)); LOG.info("Building the gather job..."); FijiMapReduceJob job = jobBuilder.build(); LOG.info("Running the gather job..."); return job.run(); }
.withInputTable(table.getURI()) .withGatherer(EmailDomainCountGatherer.class) .withCombiner(IntSumReducer.class)
for (FamilyLayout family : tableLayout.getFamilies()) { if (family.isMapType()) { getPrintStream().println(FijiURI.newBuilder(table.getURI()) .addColumnName(FijiColumnName.create(family.getName())) .build()); } else { for (ColumnLayout column : family.getColumns()) { getPrintStream().println(FijiURI.newBuilder(table.getURI()) .addColumnName(FijiColumnName.create(family.getName(), column.getName())) .build());