/** * Next. * * @return the h base data */ public HBaseDataWrapper next() { Result result = resultsIter.next(); counter++; List<Cell> cells = result.listCells(); HBaseDataWrapper data = new HBaseDataWrapper(tableName, result.getRow()); data.setColumns(cells); return data; }
Map<String, byte[]> columns = data.getColumns(); for (Map<String, Object> map : columnsToOutput) obj = HBaseUtils.fromBytes(data.getRowKey(), (Class) map.get(Constants.FIELD_CLAZZ));
Map<String, byte[]> hbaseValues = data.getColumns(); Set<String> columnNames = hbaseValues.keySet(); for (String columnName : columnNames) byte[] columnValue = data.getColumnValue(columnName); String hbaseColumnValue = Bytes.toString(columnValue); foreignKeys.add((E) hbaseColumnValue);
String discrValue = Bytes.toString(data.getColumnValue(discrColumnKey)); clazz = discrValueToEntityClazz.get(discrValue); m = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, clazz); Object rowKeyValue = HBaseUtils.fromBytes(m, metaModel, data.getRowKey()); if (!metaModel.isEmbeddable(m.getIdAttribute().getBindableJavaType()))
String colFamily = ((AbstractAttribute) attribute).getTableName() != null ? ((AbstractAttribute) attribute) .getTableName() : m.getTableName(); byte[] columnValue = hbaseData.getColumnValue(HBaseUtils.getColumnDataKey(colFamily, columnName)); if (relationNames != null && relationNames.contains(columnName) && columnValue != null && columnValue.length > 0)
/** * Sets the columns. * * @param columns * the new columns */ public void setColumns(List<Cell> columns) { for (Cell column : columns) { putColumn(CellUtil.cloneFamily(column), CellUtil.cloneQualifier(column), CellUtil.cloneValue(column)); } }
+ HBaseUtils.DELIM : ((AbstractAttribute) attribute).getJPAColumnName() + HBaseUtils.DELIM; List embeddedCollection = new ArrayList(); byte[] columnValue = hbaseData.getColumnValue(HBaseUtils.getColumnDataKey(m.getTableName(), newPrefix + HBaseUtils.SIZE)); int size = 0;
/** * Scan results. * * @param tableName * the table name * @param results * the results * @return the list * @throws IOException * Signals that an I/O exception has occurred. */ private List<HBaseDataWrapper> scanResults(final String tableName, List<HBaseDataWrapper> results) throws IOException { if (fetchSize == null) { for (Result result : scanner) { HBaseDataWrapper data = new HBaseDataWrapper(tableName, result.getRow()); data.setColumns(result.listCells()); results.add(data); } scanner = null; resultsIter = null; } return results; }
if (cells != null) HBaseDataWrapper data = new HBaseDataWrapper(tableName, result.getRow()); data.setColumns(cells); results.add(data);
if (result != null && !result.isEmpty()) HBaseDataWrapper data = new HBaseDataWrapper(tableName, result.getRow()); data.setColumns(result.listCells()); results.add(data);