Examples of addEntityColumn()


Examples of com.alibaba.wasp.plan.action.GetAction.addEntityColumn()

    String primary = "1234";
    String familyName = "info";
    String columnName = "col";
    ReadModel model = ReadModel.SNAPSHOT;
    GetAction action = new GetAction(model, tableName, Bytes.toBytes(primary));
    action.addEntityColumn(tableName, familyName, columnName, DataType.STRING, null);
    action.addEntityColumn(tableName, familyName, columnName, DataType.STRING, null);
    GetActionProto proto = ProtobufUtil.toGetActionProto(action);
    action = (GetAction) ProtobufUtil.toGetAction(proto);
    Assert.assertTrue(model == action.getReaderMode());
    Assert.assertTrue(tableName.equals(action.getFTableName()));
View Full Code Here

Examples of com.alibaba.wasp.plan.action.GetAction.addEntityColumn()

    String familyName = "info";
    String columnName = "col";
    ReadModel model = ReadModel.SNAPSHOT;
    GetAction action = new GetAction(model, tableName, Bytes.toBytes(primary));
    action.addEntityColumn(tableName, familyName, columnName, DataType.STRING, null);
    action.addEntityColumn(tableName, familyName, columnName, DataType.STRING, null);
    GetActionProto proto = ProtobufUtil.toGetActionProto(action);
    action = (GetAction) ProtobufUtil.toGetAction(proto);
    Assert.assertTrue(model == action.getReaderMode());
    Assert.assertTrue(tableName.equals(action.getFTableName()));
    Assert.assertTrue(primary.equals(Bytes.toString(action.getCombinedPrimaryKey())));
View Full Code Here

Examples of com.alibaba.wasp.plan.action.InsertAction.addEntityColumn()

    String primary = "1234";
    String familyName = "info";
    String columnName = "col";
    String value = "8899";
    InsertAction action = new InsertAction(tableName, Bytes.toBytes(primary));
    action.addEntityColumn(tableName, familyName, columnName, DataType.STRING,
        Bytes.toBytes(value));
    MessageProto message = ProtobufUtil.convertInsertAction(action);
    action = (InsertAction) ProtobufUtil.convertWriteAction(message);
    Assert.assertTrue(tableName.equals(action.getFTableName()));
    Assert.assertTrue(primary.equals(Bytes.toString(action.getCombinedPrimaryKey())));
View Full Code Here

Examples of com.alibaba.wasp.plan.action.ScanAction.addEntityColumn()

    byte[] endKey = "111".getBytes();
    int limit = 100;
    int batch = 20;
    ScanAction action = new ScanAction(readerMode, indexTableName, entityTableName,
        startKey, endKey);
    action.addEntityColumn("test", "f", "c", DataType.STRING, Bytes.toBytes(""));
    action.addEntityColumn("test", "f", "c", DataType.STRING, Bytes.toBytes(""));
    action.setBatch(batch);
    action.setLimit(limit);
    ScanActionProto proto = ProtobufUtil.convertScanAction(action);
    action = (ScanAction) ProtobufUtil.convertScanAction(proto);
View Full Code Here

Examples of com.alibaba.wasp.plan.action.ScanAction.addEntityColumn()

    int limit = 100;
    int batch = 20;
    ScanAction action = new ScanAction(readerMode, indexTableName, entityTableName,
        startKey, endKey);
    action.addEntityColumn("test", "f", "c", DataType.STRING, Bytes.toBytes(""));
    action.addEntityColumn("test", "f", "c", DataType.STRING, Bytes.toBytes(""));
    action.setBatch(batch);
    action.setLimit(limit);
    ScanActionProto proto = ProtobufUtil.convertScanAction(action);
    action = (ScanAction) ProtobufUtil.convertScanAction(proto);
    Assert.assertTrue(readerMode == action.getReaderMode());
View Full Code Here

Examples of com.alibaba.wasp.plan.action.UpdateAction.addEntityColumn()

    String primary = "1234";
    String familyName = "info";
    String columnName = "col";
    String value = "8899";
    UpdateAction action = new UpdateAction(tableName, Bytes.toBytes(primary));
    action.addEntityColumn(tableName, familyName, columnName, DataType.STRING,
        Bytes.toBytes(value));
    MessageProto message = ProtobufUtil.convertUpdateAction(action);
    action = (UpdateAction) ProtobufUtil.convertWriteAction(message);
    Assert.assertTrue(tableName.equals(action.getFTableName()));
    Assert.assertTrue(primary.equals(Bytes.toString(action.getCombinedPrimaryKey())));
View Full Code Here

Examples of com.alibaba.wasp.plan.action.UpdateAction.addEntityColumn()

      // Check the input is the same as DataType
      checkType(field, updateItem.getValue());
      byte[] value = convert(field, updateItem.getValue());
      String familyName = metaEventOperation.getColumnFamily(fTableName,
          columnName);
      action.addEntityColumn(fTableName, familyName, columnName,
          field.getType(), value);
    }
    if (context.isGenWholePlan()) {
      Condition entityGroupKeyCondition = ParserUtils.getCondition(table
          .getEntityGroupKey().getName(), conditions);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.