/** {@inheritDoc} */ @Override public EntityId getEntityId(Object... fijiRowKey) { return mTable.getEntityId(fijiRowKey); }
/** * Gets an EntityId for this FijiRowKeyComponents appropriate to the given table. * * @param table the FijiTable to generate an EntityId. The table's row key format must be * compatible with the number and type of the components. * @return an EntityId appropriate to the table. */ public EntityId getEntityIdForTable(FijiTable table) { return table.getEntityId(mComponents); }
/** {@inheritDoc} */ @Override public void map(LongWritable byteOffset, Text line, Context hadoopContext) throws IOException, InterruptedException { // Each line of the text file has the form: // // firstname | lastname | talktime // // Split the input line by the pipe '|' character. final String[] fields = line.toString().split("\\|"); if (3 != fields.length) { LOG.error("Invalid number of fields (" + fields.length + ") in line: " + line.toString()); return; // No inserts for this mal-formed line. } // Read each line and split it into its individual components. final String firstName = fields[0]; final String lastName = fields[1]; final long talkTime = new Long(fields[2].replaceAll("\\s", "")); // Generate the row ID belonging to the user with this "firstname,lastname". final EntityId user = mTable.getEntityId(firstName + "," + lastName); // Add the talk time to the stats:talktime column. mWriter.increment(user, "stats", "talktime", talkTime); }
final EntityId user = table.getEntityId(firstName + "," + lastName);
final String email = EmailSynthesizer.formatEmail(fullName.replace(" ", "."), emailSynth.synthesizeDomain()); final EntityId entityId = mTable.getEntityId(email); tableWriter.put(entityId, "info", "name", fullName); tableWriter.put(entityId, "info", "email", email);
EntityId user = table.getEntityId(first + "," + last);
final FijiTableReader reader = mFijiTable.openTableReader(); try { data = reader.get(mFijiTable.getEntityId(jobId), request); } finally { reader.close();
final EntityId entityId = table.getEntityId(mFirst + "," + mLast); final FijiDataRequestBuilder reqBuilder = FijiDataRequest.builder(); reqBuilder.newColumnsDef()
final EntityId user = table.getEntityId(first + "," + last);
) throws IOException { final EntityId eid = mFijiTable.getEntityId(jobId); final AtomicFijiPutter putter = mFijiTable.getWriterFactory().openAtomicPutter(); try {