Examples of removeConstraint()


Examples of com.foundationdb.ais.model.AkibanInformationSchema.removeConstraint()

        List<TableIndex> indexes = new ArrayList<>(tableCopy.getIndexes());
        for(TableIndex index : indexes) {
            if(index.containsTableColumn(tableName, oldColName)) {
                tableCopy.removeIndexes(Collections.singleton(index));
                if (index.getConstraintName() != null) {
                    aisCopy.removeConstraint(index.getConstraintName());
                }
                TableIndex indexCopy = TableIndex.create(tableCopy, index);
                for(IndexColumn iCol : index.getKeyColumns()) {
                    IndexColumn.create(indexCopy, (iCol.getColumn() == oldColumn) ? newColumn : iCol.getColumn(), iCol, iCol.getPosition());
                }
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.NamespaceOperations.removeConstraint()

            fail();
          case 7:
            ops.listIterators(namespace);
            fail();
          case 8:
            ops.removeConstraint(namespace, 1);
            fail();
          case 9:
            ops.removeIterator(namespace, "thing", EnumSet.allOf(IteratorScope.class));
            fail();
          case 10:
View Full Code Here

Examples of org.apache.accumulo.core.client.admin.TableOperations.removeConstraint()

    numRun = 0;
    ACCUMULOEXCEPTIONS_TABLENOTFOUND: for (int i = 0;; ++i)
      try {
        switch (i) {
          case 0:
            ops.removeConstraint(tableName, 0);
            fail();
          case 1:
            ops.removeProperty(tableName, "a");
            fail();
          case 2:
View Full Code Here

Examples of org.apache.helix.HelixAdmin.removeConstraint()

        tool.getConstraints(clusterName, ConstraintType.MESSAGE_CONSTRAINT);
    Assert.assertNull(constraints, "message-constraint should NOT exist for cluster: " + className);

    // remove non-exist constraint
    try {
      tool.removeConstraint(clusterName, ConstraintType.MESSAGE_CONSTRAINT, "constraint1");
      // will leave a null message-constraint znode on zk
    } catch (Exception e) {
      Assert.fail("Should not throw exception when remove a non-exist constraint.");
    }
View Full Code Here

Examples of org.apache.helix.HelixAdmin.removeConstraint()

    Assert.assertNotNull(item, "message-constraint for constraint1 should exist");
    Assert.assertEquals(item.getConstraintValue(), "1");
    Assert.assertEquals(item.getAttributeValue(ConstraintAttribute.RESOURCE), "MyDB");

    // remove a exist message-constraint
    tool.removeConstraint(clusterName, ConstraintType.MESSAGE_CONSTRAINT, "constraint1");
    constraints =
        accessor.getProperty(keyBuilder.constraint(ConstraintType.MESSAGE_CONSTRAINT.toString()));
    Assert.assertNotNull(constraints, "message-constraint should exist");
    item = constraints.getConstraintItem(ConstraintId.from("constraint1"));
    Assert.assertNull(item, "message-constraint for constraint1 should NOT exist");
View Full Code Here

Examples of org.apache.helix.api.accessor.ClusterAccessor.removeConstraint()

  void removeConstraint(String[] optValues) {
    String clusterName = optValues[0];
    ConstraintType constraintType = ConstraintType.valueOf(optValues[1]);
    ConstraintId constraintId = ConstraintId.from(optValues[2]);
    ClusterAccessor accessor = clusterAccessor(clusterName);
    accessor.removeConstraint(constraintType, constraintId);
  }

  void listClusterInfo(String[] optValues) {
    String clusterName = optValues[0];
    ClusterAccessor accessor = clusterAccessor(clusterName);
View Full Code Here

Examples of org.apache.helix.tools.ClusterSetup.removeConstraint()

    try {
      ZkClient zkClient =
          (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
      ClusterSetup setupTool = new ClusterSetup(zkClient);

      setupTool.removeConstraint(clusterName, constraintTypeStr, constraintId);

    } catch (Exception e) {
      LOG.error("Error in deleting ", e);
      getResponse().setEntity(ClusterRepresentationUtil.getErrorAsJsonStringFromException(e),
          MediaType.APPLICATION_JSON);
View Full Code Here

Examples of org.apache.helix.tools.ClusterSetup.removeConstraint()

    try {
      ZkClient zkClient =
          (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
      ClusterSetup setupTool = new ClusterSetup(zkClient);

      setupTool.removeConstraint(clusterName, constraintTypeStr, constraintId);

    } catch (Exception e) {
      LOG.error("Error in deleting ", e);
      getResponse().setEntity(ClusterRepresentationUtil.getErrorAsJsonStringFromException(e),
          MediaType.APPLICATION_JSON);
View Full Code Here

Examples of org.apache.helix.tools.ClusterSetup.removeConstraint()

    try {
      ZkClient zkClient =
          (ZkClient) getContext().getAttributes().get(RestAdminApplication.ZKCLIENT);
      ClusterSetup setupTool = new ClusterSetup(zkClient);
    
      setupTool.removeConstraint(clusterName, constraintTypeStr, constraintId);

    }
    catch (Exception e)
    {
      LOG.error("Error in deleting ", e);
View Full Code Here

Examples of org.drools.brms.client.modeldriven.brl.FactPattern.removeConstraint()

        p.addConstraint( y );

        assertEquals( 2,
                      p.constraintList.constraints.length );

        p.removeConstraint( 1 );

        assertEquals( 1,
                      p.constraintList.constraints.length );

        assertEquals( x,
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.