Examples of constraint()


Examples of com.linkedin.helix.PropertyKey.Builder.constraint()

  {
    ZkBaseDataAccessor<ZNRecord> baseAccessor =
        new ZkBaseDataAccessor<ZNRecord>(_zkClient);

    Builder keyBuilder = new Builder(clusterName);
    String path = keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()).getPath();

    baseAccessor.update(path, new DataUpdater<ZNRecord>()
    {
      @Override
      public ZNRecord update(ZNRecord currentData)
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.nodes.NodeSetConstraintBuilder.constraint()

    for (Var var: nodeSets.keySet()) {
      NodeSetConstraintBuilder nodeSet = (NodeSetConstraintBuilder) nodeSets.get(var);
      if (nodeSet.isEmpty()) {
        return Expression.FALSE;
      }
      expressions.add(nodeSet.constraint());
    }
    return Conjunction.create(expressions);
  }

  /**
 
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.constraint()

  {
    ZkBaseDataAccessor<ZNRecord> baseAccessor =
        new ZkBaseDataAccessor<ZNRecord>(_zkClient);

    Builder keyBuilder = new Builder(clusterName);
    String path = keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()).getPath();

    baseAccessor.update(path, new DataUpdater<ZNRecord>()
    {
      @Override
      public ZNRecord update(ZNRecord currentData)
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.constraint()

    record.getMapField("constraint5").put("RESOURCE", "TestDB");
    record.getMapField("constraint5").put("CONSTRAINT_VALUE", "3");
    ConstraintItem constraint5 = new ConstraintItem(record.getMapField("constraint5"));

    Builder keyBuilder = accessor.keyBuilder();
    accessor.setProperty(keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()),
                         new ClusterConstraints(record));

    // ClusterConstraints constraint =
    // accessor.getProperty(ClusterConstraints.class,
    // PropertyType.CONFIGS,
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.constraint()

    // accessor.getProperty(ClusterConstraints.class,
    // PropertyType.CONFIGS,
    // ConfigScopeProperty.CONSTRAINT.toString(),
    // ConstraintType.MESSAGE_CONSTRAINT.toString());
    ClusterConstraints constraint =
        accessor.getProperty(keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()));

    MessageThrottleStage throttleStage = new MessageThrottleStage();

    // test constraintSelection
    // message1: hit contraintSelection rule1 and rule2
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.constraint()

    ZKHelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor(_gZkClient));
    Builder keyBuilder = accessor.keyBuilder();

    accessor.setProperty(keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()),
                         new ClusterConstraints(record));

    record =
        accessor.getProperty(keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()))
                .getRecord();
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.constraint()

    accessor.setProperty(keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()),
                         new ClusterConstraints(record));

    record =
        accessor.getProperty(keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()))
                .getRecord();
    ClusterConstraints constraint = new ClusterConstraints(record);
    // System.out.println("constraint: " + constraint);

    // message1
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.constraint()

    ZKHelixDataAccessor accessor =
        new ZKHelixDataAccessor(clusterName, new ZkBaseDataAccessor(_gZkClient));
    Builder keyBuilder = accessor.keyBuilder();

    accessor.setProperty(keyBuilder.constraint(ConstraintType.STATE_CONSTRAINT.toString()),
                         new ClusterConstraints(record));

    record =
        accessor.getProperty(keyBuilder.constraint(ConstraintType.STATE_CONSTRAINT.toString()))
                .getRecord();
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.constraint()

    accessor.setProperty(keyBuilder.constraint(ConstraintType.STATE_CONSTRAINT.toString()),
                         new ClusterConstraints(record));

    record =
        accessor.getProperty(keyBuilder.constraint(ConstraintType.STATE_CONSTRAINT.toString()))
                .getRecord();
    ClusterConstraints constraint = new ClusterConstraints(record);
    // System.out.println("constraint: " + constraint);

    // state1: hit rule2
View Full Code Here

Examples of org.apache.helix.PropertyKey.Builder.constraint()

    record.getMapField("constraint5").put("RESOURCE", "TestDB");
    record.getMapField("constraint5").put("CONSTRAINT_VALUE", "3");
    ConstraintItem constraint5 = new ConstraintItem(record.getMapField("constraint5"));

    Builder keyBuilder = accessor.keyBuilder();
    accessor.setProperty(keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()),
        new ClusterConstraints(record));

    // ClusterConstraints constraint =
    // accessor.getProperty(ClusterConstraints.class,
    // PropertyType.CONFIGS,
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.