/** * Get the unsorted list of HBase mutations for the tables with uncommitted data. * * @return list of HBase mutations for uncommitted data. */ public Iterator<Pair<byte[], List<Mutation>>> toMutations(Long timestamp) { return toMutations(false, timestamp); }
public Iterator<Pair<byte[], List<Mutation>>> toMutations() { return toMutations(false, null); }
public Iterator<Pair<byte[], List<Mutation>>> toMutations(final boolean includeMutableIndexes) { return toMutations(includeMutableIndexes, null); }
final Iterator<Pair<byte[],List<Mutation>>> iterator = pconn.getMutationState().toMutations(includeMutableIndexes); return new Iterator<Pair<byte[],List<Cell>>>() {
private void writeBatch(MutationState mutationState, Context context) throws IOException, SQLException, InterruptedException { final Iterator<Pair<byte[], List<Mutation>>> iterator = mutationState.toMutations(true, null); while (iterator.hasNext()) { Pair<byte[], List<Mutation>> mutationPair = iterator.next(); List<Mutation> batchMutations = mutationPair.getSecond(); List<List<Mutation>> batchOfBatchMutations = MutationState.getMutationBatchList(batchSize, batchSizeBytes, batchMutations); for (List<Mutation> mutationList : batchOfBatchMutations) { writer.write(mutationList); } context.getCounter(PhoenixJobCounters.OUTPUT_RECORDS).increment( mutationPair.getSecond().size()); } connection.rollback(); currentBatchCount = 0; }
tableMetadata.addAll(metaConnection.getMutationState().toMutations(metaConnection.getSCN()).next().getSecond()); metaConnection.rollback(); PColumn column = new PColumnImpl(PNameFactory.newName("COLUMN_QUALIFIER"), colUpsert.execute(); tableMetadata.addAll(metaConnection.getMutationState().toMutations(metaConnection.getSCN()).next().getSecond()); metaConnection.rollback(); metaConnection.getQueryServices().addColumn(tableMetadata, sysCatalogPTable, Collections.<String,List<Pair<String,Object>>>emptyMap(), Collections.<String>emptySet(), Lists.newArrayList(column));
private void assertDurability(Connection conn, Durability durability) throws SQLException { PhoenixConnection pconn = conn.unwrap(PhoenixConnection.class); Iterator<Pair<byte[], List<Mutation>>> it = pconn.getMutationState().toMutations(); assertTrue(it.hasNext()); while (it.hasNext()) { Pair<byte[], List<Mutation>> pair = it.next(); assertFalse(pair.getSecond().isEmpty()); for (Mutation m : pair.getSecond()) { assertEquals(durability, m.getDurability()); } } }
final Iterator<Pair<byte[],List<Mutation>>> iterator = pconn.getMutationState().toMutations(true); while (iterator.hasNext()) { Pair<byte[], List<Mutation>> pair = iterator.next();
/** * Get the unsorted list of HBase mutations for the tables with uncommitted data. * * @return list of HBase mutations for uncommitted data. */ public Iterator<Pair<byte[], List<Mutation>>> toMutations(Long timestamp) { return toMutations(false, timestamp); }
/** * Get the unsorted list of HBase mutations for the tables with uncommitted data. * * @return list of HBase mutations for uncommitted data. */ public Iterator<Pair<byte[], List<Mutation>>> toMutations(Long timestamp) { return toMutations(false, timestamp); }
public Iterator<Pair<byte[], List<Mutation>>> toMutations() { return toMutations(false, null); }
addFunctionArgMutation(function.getFunctionName(), arg, argUpsert, i); functionData.addAll(connection.getMutationState().toMutations().next().getSecond()); connection.rollback(); functionUpsert.setString(6, function.getReturnType()); functionUpsert.execute(); functionData.addAll(connection.getMutationState().toMutations(null).next().getSecond()); connection.rollback();
public Iterator<Pair<byte[], List<Mutation>>> toMutations() { return toMutations(false, null); }
public Iterator<Pair<byte[], List<Mutation>>> toMutations(final boolean includeMutableIndexes) { return toMutations(includeMutableIndexes, null); }
public Iterator<Pair<byte[], List<Mutation>>> toMutations(final boolean includeMutableIndexes) { return toMutations(includeMutableIndexes, null); }
List<Mutation> tableMetadata = connection.getMutationState().toMutations(timeStamp).next().getSecond(); connection.rollback(); tableMetadata.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback(); tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();
tableMetaData.addAll(connection.getMutationState().toMutations(timestamp).next().getSecond()); connection.rollback(); tableMetaData.addAll(connection.getMutationState().toMutations(timestamp).next().getSecond()); connection.rollback(); incrementStatement.execute(); if (connection.getMutationState().toMutations(timestamp).hasNext()) { tableMetaData.addAll(connection.getMutationState().toMutations(timestamp).next().getSecond()); connection.rollback(); addColumnMutation(schemaName, tableName, column, colUpsert, parentTableName, pkName, keySeq, saltBucketNum != null); columnMetadata.addAll(connection.getMutationState().toMutations(timestamp).next().getSecond()); connection.rollback(); setSync.execute(); tableMetaData.addAll(connection.getMutationState().toMutations(timestamp).next().getSecond()); connection.rollback();
schemaUpsert.setString(2, MetaDataClient.EMPTY_TABLE); schemaUpsert.execute(); schemaMutations = connection.getMutationState().toMutations(null).next().getSecond(); connection.rollback();
columnMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback(); metaPropertiesEvaluated.getUpdateCacheFrequency()); tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback(); incrementTableSeqNum(table, tableType, columnDefs.size(), metaPropertiesEvaluated); tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback(); incrementStatement.execute(); tableMetaData.addAll(connection.getMutationState().toMutations(timeStamp).next().getSecond()); connection.rollback();