public static PColumnImpl createExcludedColumn(PName familyName, PName columnName, Long timestamp) { return new PColumnImpl(familyName, columnName, timestamp); }
@Override public PColumn apply(org.apache.phoenix.coprocessor.generated.PTableProtos.PColumn column) { return PColumnImpl.createFromProto(column); } });
private void addExcludedColumnToTable(List<PColumn> pColumns, PName colName, PName famName, long timestamp) { PColumnImpl pColumn = PColumnImpl.createExcludedColumn(famName, colName, timestamp); pColumns.add(pColumn); }
for (int i = offset; i < columnSize; i++) { PColumn column = columns.get(i); builder.addColumns(PColumnImpl.toProto(column));
public PColumnImpl(PName name, PName familyName, PDataType dataType, Integer maxLength, Integer scale, boolean nullable, int position, SortOrder sortOrder, Integer arrSize, byte[] viewConstant, boolean isViewReferenced, String expressionStr, boolean isRowTimestamp, boolean isDynamic, byte[] columnQualifierBytes, long timestamp, boolean derived) { init(name, familyName, dataType, maxLength, scale, nullable, position, sortOrder, arrSize, viewConstant, isViewReferenced, expressionStr, isRowTimestamp, isDynamic, columnQualifierBytes, timestamp, derived); }
public static List<KeyRange> generateAllSaltingRanges(int bucketNum) { List<KeyRange> allRanges = Lists.newArrayListWithExpectedSize(bucketNum); for (int i=0; i<bucketNum; i++) { byte[] saltByte = new byte[] {(byte) i}; allRanges.add(SALTING_COLUMN.getDataType().getKeyRange( saltByte, true, saltByte, true)); } return allRanges; }
allColumns[SALTING_COLUMN.getPosition()] = SALTING_COLUMN; pkColumns = Lists.newArrayListWithExpectedSize(this.columns.size()+1); ++numPKColumns;
org.apache.phoenix.coprocessor.generated.MetaDataProtos.SharedTableState.newBuilder(); for (PColumn col : sharedTableState.getColumns()) { sharedTableStateBuilder.addColumns(PColumnImpl.toProto(col));
public PColumnImpl(PName name, PName familyName, PDataType dataType, Integer maxLength, Integer scale, boolean nullable, int position, SortOrder sortOrder, Integer arrSize, byte[] viewConstant, boolean isViewReferenced, String expressionStr, boolean isRowTimestamp, boolean isDynamic, byte[] columnQualifierBytes, long timestamp, boolean derived) { init(name, familyName, dataType, maxLength, scale, nullable, position, sortOrder, arrSize, viewConstant, isViewReferenced, expressionStr, isRowTimestamp, isDynamic, columnQualifierBytes, timestamp, derived); }
public static List<KeyRange> generateAllSaltingRanges(int bucketNum) { List<KeyRange> allRanges = Lists.newArrayListWithExpectedSize(bucketNum); for (int i=0; i<bucketNum; i++) { byte[] saltByte = new byte[] {(byte) i}; allRanges.add(SALTING_COLUMN.getDataType().getKeyRange( saltByte, true, saltByte, true)); } return allRanges; }
allColumns[SALTING_COLUMN.getPosition()] = SALTING_COLUMN; pkColumns = Lists.newArrayListWithExpectedSize(columns.size()+1); ++numPKColumns;
tableMetadata.addAll(metaConnection.getMutationState().toMutations(metaConnection.getSCN()).next().getSecond()); metaConnection.rollback(); PColumn column = new PColumnImpl(PNameFactory.newName("COLUMN_QUALIFIER"), PNameFactory.newName(DEFAULT_COLUMN_FAMILY_NAME), PVarbinary.INSTANCE, null, null, true, numColumns, SortOrder.ASC, null, null, false, null, false, false,
@Override public PColumn apply(org.apache.phoenix.coprocessor.generated.PTableProtos.PColumn column) { return PColumnImpl.createFromProto(column); } });
for (int i = offset; i < columnSize; i++) { PColumn column = columns.get(i); builder.addColumns(PColumnImpl.toProto(column));
private void addExcludedColumnToTable(List<PColumn> pColumns, PName colName, PName famName, long timestamp) { PColumnImpl pColumn = PColumnImpl.createExcludedColumn(famName, colName, timestamp); pColumns.add(pColumn); }
public PColumnImpl(PName name, PName familyName, PDataType dataType, Integer maxLength, Integer scale, boolean nullable, int position, SortOrder sortOrder, Integer arrSize, byte[] viewConstant, boolean isViewReferenced, String expressionStr, boolean isRowTimestamp, boolean isDynamic, byte[] columnQualifierBytes) { init(name, familyName, dataType, maxLength, scale, nullable, position, sortOrder, arrSize, viewConstant, isViewReferenced, expressionStr, isRowTimestamp, isDynamic, columnQualifierBytes); }
public static List<KeyRange> generateAllSaltingRanges(int bucketNum) { List<KeyRange> allRanges = Lists.newArrayListWithExpectedSize(bucketNum); for (int i=0; i<bucketNum; i++) { byte[] saltByte = new byte[] {(byte) i}; allRanges.add(SALTING_COLUMN.getDataType().getKeyRange( saltByte, true, saltByte, true)); } return allRanges; }
allColumns[SALTING_COLUMN.getPosition()] = SALTING_COLUMN; pkColumns = Lists.newArrayListWithExpectedSize(this.columns.size()+1); ++numPKColumns;
protected PTable addDynamicColumns(List<ColumnDef> dynColumns, PTable theTable) throws SQLException { if (!dynColumns.isEmpty()) { List<PColumn> allcolumns = new ArrayList<PColumn>(); List<PColumn> existingColumns = theTable.getColumns(); // Need to skip the salting column, as it's handled in the PTable builder call below allcolumns.addAll(theTable.getBucketNum() == null ? existingColumns : existingColumns.subList(1, existingColumns.size())); // Position still based on with the salting columns int position = existingColumns.size(); PName defaultFamilyName = PNameFactory.newName(SchemaUtil.getEmptyColumnFamily(theTable)); for (ColumnDef dynColumn : dynColumns) { PName familyName = defaultFamilyName; PName name = PNameFactory.newName(dynColumn.getColumnDefName().getColumnName()); String family = dynColumn.getColumnDefName().getFamilyName(); if (family != null) { theTable.getColumnFamily(family); // Verifies that column family exists familyName = PNameFactory.newName(family); } allcolumns.add(new PColumnImpl(name, familyName, dynColumn.getDataType(), dynColumn.getMaxLength(), dynColumn.getScale(), dynColumn.isNull(), position, dynColumn.getSortOrder(), dynColumn.getArraySize(), null, false, dynColumn.getExpression(), false, true, Bytes.toBytes(dynColumn.getColumnDefName().getColumnName()), HConstants.LATEST_TIMESTAMP)); position++; } theTable = PTableImpl.builderWithColumns(theTable, allcolumns) .build(); } return theTable; }
@Override public PColumn apply(org.apache.phoenix.coprocessor.generated.PTableProtos.PColumn column) { return PColumnImpl.createFromProto(column); } });