/** * Get the list of uncommitted KeyValues for the connection. Currently used to write an * Phoenix-compliant HFile from a map/reduce job. * @param conn an open JDBC connection * @return the list of HBase mutations for uncommitted data * @throws SQLException */ public static Iterator<Pair<byte[],List<KeyValue>>> getUncommittedDataIterator(Connection conn) throws SQLException { return getUncommittedDataIterator(conn, false); }
/** * Get the list of uncommitted KeyValues for the connection. Currently used to write an * Phoenix-compliant HFile from a map/reduce job. * @param conn an open JDBC connection * @return the list of HBase mutations for uncommitted data * @throws SQLException */ @Deprecated public static List<KeyValue> getUncommittedData(Connection conn) throws SQLException { Iterator<Pair<byte[],List<KeyValue>>> iterator = getUncommittedDataIterator(conn); if (iterator.hasNext()) { return iterator.next().getSecond(); } return Collections.emptyList(); }
dataIterator = PhoenixRuntime.getUncommittedDataIterator(conn_zk); } catch (SQLException e) { System.err.println("Failed to retrieve the data iterator for Phoenix table :: " + e.getMessage());
statement.execute(); Iterator<Pair<byte[],List<KeyValue>>> dataIterator = PhoenixRuntime.getUncommittedDataIterator(conn); Iterator<KeyValue> iterator = dataIterator.next().getSecond().iterator();
Iterator<Pair<byte[],List<KeyValue>>> iterator = PhoenixRuntime.getUncommittedDataIterator(conn); List<KeyValue> dataKeyValues = iterator.next().getSecond(); KeyValue keyValue = dataKeyValues.get(0);
Iterator<Pair<byte[],List<KeyValue>>> iterator = PhoenixRuntime.getUncommittedDataIterator(conn); List<KeyValue> dataKeyValues = iterator.next().getSecond(); Map<ColumnReference,byte[]> valueMap = Maps.newHashMapWithExpectedSize(dataKeyValues.size());
Iterator<Pair<byte[],List<KeyValue>>> iterator = PhoenixRuntime.getUncommittedDataIterator(conn); List<KeyValue> dataKeyValues = iterator.next().getSecond(); KeyValue keyValue = dataKeyValues.get(0);