public static Record record(RecordFactory factory, Tuple<NodeId> tuple, ColumnMap cMap) { byte[] b = new byte[tuple.len()*NodeId.SIZE] ; for ( int i = 0 ; i < tuple.len() ; i++ ) { int j = cMap.mapSlotIdx(i) ; // i'th Nodeid goes to j'th bytes slot. Bytes.setLong(tuple.get(i).getId(), b,j*SizeOfLong) ; } return factory.create(b) ; } }
int j = ( colMap == null ) ? i : colMap.mapSlotIdx(i) ; int recordOffset = j*SystemTDB.SizeOfLong ; Bytes.setLong(x, record.getKey(), recordOffset) ;