Examples of InsertAction


Examples of client.net.sf.saxon.ce.trans.update.InsertAction

                  Node child = targetNode.getChild(i);
                  list.add(new DeleteAction(child));
              }
          }
 
          list.add(new InsertAction(container, targetNode, InsertAction.LAST));
        }
        //controller.setResultTree(absoluteResultURI.toString(), root);
        return null;
    }
View Full Code Here

Examples of com.alibaba.wasp.plan.action.InsertAction

    String tableName = "test";
    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())));
    Assert.assertTrue(action.getColumns().get(0).getFamilyName()
        .equals(familyName)
        && action.getColumns().get(0).getColumnName().equals(columnName)
        && Bytes.toString(action.getColumns().get(0).getValue()).equals(value));
  }
View Full Code Here

Examples of com.alibaba.wasp.plan.action.InsertAction

      FTable table, LinkedHashSet<String> insertColumns, ValuesClause values)
      throws IOException {
    Pair<List<Pair<String, byte[]>>, List<ColumnStruct>> pair = buildFieldsPair(
        metaEventOperation, table, insertColumns, values);
    byte[] primaryKey = RowBuilder.build().genRowkey(pair.getFirst());
    return new InsertAction(table.getTableName(), pair.getFirst().get(0)
        .getSecond(), primaryKey, pair.getSecond());
  }
View Full Code Here

Examples of com.alibaba.wasp.plan.action.InsertAction

    entityGroups.add(entityGroup3);

    List<Action> actions1 = new ArrayList<Action>();
    List<Action> actions2 = new ArrayList<Action>();
    List<Action> actions3 = new ArrayList<Action>();
    Action action1 = new InsertAction("testtable1", Bytes.toBytes("PK1"));
    Action action2 = new InsertAction("testtable2", Bytes.toBytes("PK2"));
    Action action3 = new InsertAction("testtable3", Bytes.toBytes("PK3"));
    actions1.add(action1);
    actions2.add(action2);
    actions3.add(action3);

    Map<EntityGroupInfo, List<Action>> transcation = new HashMap<EntityGroupInfo, List<Action>>();
View Full Code Here

Examples of com.alibaba.wasp.plan.action.InsertAction

    this.entityGroup = initEntityGroup(tableName, method, conf, fileds);

    PublisherBuilder builder = new PublisherBuilder();
    Publisher publisher = builder.build(conf, entityGroup.getEntityGroupInfo());

    Message message = new InsertAction("testtable", Bytes.toBytes("PK"));

    MessageID mId = publisher.doAsynchronous(message);

    assertTrue(mId != null);
View Full Code Here

Examples of com.alibaba.wasp.plan.action.InsertAction

    PublisherBuilder builder = new PublisherBuilder();
    Publisher publisher1 = builder.build(conf, entityGroup1.getEntityGroupInfo());
    Publisher publisher2 = builder.build(conf, entityGroup2.getEntityGroupInfo());
    Publisher publisher3 = builder.build(conf, entityGroup3.getEntityGroupInfo());

    Message message1 = new InsertAction("testtable1", Bytes.toBytes("PK1"));
    Message message2 = new InsertAction("testtable2", Bytes.toBytes("PK2"));
    Message message3 = new InsertAction("testtable3", Bytes.toBytes("PK3"));

    publisher1.doAsynchronous(message1);
    publisher2.doAsynchronous(message2);
    publisher3.doAsynchronous(message3);
  }
View Full Code Here

Examples of com.alibaba.wasp.plan.action.InsertAction

  @Override
  public List<ClientProtos.WriteResultProto> execInsertPlan(InsertPlan plan)
      throws ServiceException {
    List<ClientProtos.WriteResultProto> writeResultProtos = new ArrayList<ClientProtos.WriteResultProto>();
    List<InsertAction> actions = plan.getActions();
    InsertAction action = actions.get(0);
    EntityGroupInfo entityGroupInfo = action.getEntityGroupLocation()
        .getEntityGroupInfo();
    ServerName serverName = new ServerName(action.getEntityGroupLocation()
        .getHostname(), action.getEntityGroupLocation().getPort(),
        ServerName.NON_STARTCODE);
    // if actions > 1. will commit by 2pc
    if (actions.size() == 1) {
      try {
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.impl.InsertAction

            final ColumnAttrib keyAttrib = tableMapping.getKeyAttrib();
            if (!record.isCurrentValueSet(keyAttrib))
                throw new HBqlException("Record key value must be assigned");

            final Put put = this.createPut(record.getResultAccessor(), record);
            this.getActionList(tableMapping.getTableName()).add(new InsertAction(put));
        }
        else {
            final AnnotationResultAccessor accessor = this.getHConnectionImpl().getAnnotationMapping(newrec);
            final Put put = this.createPut(accessor, newrec);
            this.getActionList(accessor.getMapping().getTableName()).add(new InsertAction(put));
        }
    }
View Full Code Here

Examples of org.geotools.data.wfs.v1_0_0.Action.InsertAction

                return;
            }

            output.startElement(element.getNamespace(), element.getName(), null);

            InsertAction a = (InsertAction) value;

            // find element definition
            // should exist when original from a WFS ...
            SimpleFeature f = a.getFeature();
            SimpleFeatureType featureType = f.getFeatureType();
            Name name = featureType.getName();           
            Schema schema = SchemaFactory.getInstance( name.getNamespaceURI() );
            Element[] els = schema.getElements();
            Element e = null;
View Full Code Here

Examples of org.geotools.data.wfs.v1_0_0.Action.InsertAction

                              bounds.expandToInclude(g.getEnvelopeInternal());
                          }
                      }
                    }
                }
                ts.addAction(schema.getTypeName(), new InsertAction(newFeature));

            } catch (NoSuchElementException e) {
                WFS_1_0_0_DataStore.LOGGER.warning(e.toString());
                throw new IOException(e.toString());
            }
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.