Examples of addPartition()


Examples of org.eclipse.persistence.descriptors.partitioning.ValuePartitioningPolicy.addPartition()

        for (ValuePartitionMetadata partition : getPartitions()) {
            Object value = initObject(type, partition.getValue());
            if (policy.getPartitions().containsKey(value)) {
                throw ValidationException.duplicatePartitionValue(getName(), value);
            }
            policy.addPartition(value, partition.getConnectionPool());
        }
        return policy;
    }
   
    /**
 
View Full Code Here

Examples of org.wso2.carbon.apacheds.PartitionManager.addPartition()

                        configurationBuilder.getPartitionConfigurations();
                boolean defaultPartitionAlreadyExisted=partitionManager.partitionDirectoryExists(
                        defaultPartitionInfo.getPartitionId());

                if (!defaultPartitionAlreadyExisted) {
                    partitionManager.addPartition(defaultPartitionInfo);
                } else {
                    partitionManager.initializeExistingPartition(defaultPartitionInfo);
                }

                // Start KDC if enabled
View Full Code Here

Examples of org.wso2.carbon.apacheds.PartitionManager.addPartition()

        AdminInfo adminInfo =
            new AdminInfo("duck", "Donald", "Duck", "dduck@wso2.com", "password", PasswordAlgorithm.MD5, groupInfo);
        PartitionInfo partitionInfo = new PartitionInfo("duck1", "wso2donald.com", "dc=wso2donald,dc=com", adminInfo);

        assertFalse("Partition already exists", partitionManager.partitionInitialized(partitionInfo.getPartitionId()));
        partitionManager.addPartition(partitionInfo);
        assertTrue("Partition has not created", partitionManager.partitionInitialized(partitionInfo.getPartitionId()));

        addDummyPartition();

    }
View Full Code Here

Examples of org.wso2.carbon.apacheds.PartitionManager.addPartition()

            new AdminInfo("amilaj", "Amila", "Jayasekara", "amilaj@wso2.com", "iceage", PasswordAlgorithm.SHA,
                          groupInfo);
        PartitionInfo partitionInfo = new PartitionInfo("example", "example.com", "dc=example,dc=com", adminInfo);
        partitionInfo.setKdcEnabled(true);

        partitionManager.addPartition(partitionInfo);
        assertTrue("Partition has not created", partitionManager.partitionInitialized(partitionInfo.getPartitionId()));

        KdcConfiguration config = new KdcConfiguration(partitionInfo);
        //config.setPrimaryRealm("EXAMPLE.COM");
View Full Code Here

Examples of org.wso2.carbon.apacheds.PartitionManager.addPartition()

            new AdminInfo("amilaj", "Amila", "Jayasekara", "amilaj@wso2.com", "iceage", PasswordAlgorithm.SHA,
                          groupInfo);
        PartitionInfo partitionInfo = new PartitionInfo("example", "example.com", "dc=example,dc=com", adminInfo);
        partitionInfo.setKdcEnabled(kdcEnabled);

        partitionManager.addPartition(partitionInfo);
        assertTrue("Partition has not created", partitionManager.partitionInitialized(partitionInfo.getPartitionId()));
    }

    public class MonitorObject {
View Full Code Here

Examples of storm.kafka.trident.GlobalPartitionInformation.addPartition()

                int leader = getLeaderFor(partition);
                String path = brokerInfoPath + "/" + leader;
                try {
                    byte[] brokerData = _curator.getData().forPath(path);
                    Broker hp = getBrokerHost(brokerData);
                    globalPartitionInformation.addPartition(partition, hp);
                } catch (org.apache.zookeeper.KeeperException.NoNodeException e) {
                    LOG.error("Node {} does not exist ", path);
                }
            }
        } catch (SocketTimeoutException e) {
View Full Code Here

Examples of storm.kafka.trident.GlobalPartitionInformation.addPartition()


    public static GlobalPartitionInformation buildPartitionInfo(int numPartitions, int brokerPort) {
        GlobalPartitionInformation globalPartitionInformation = new GlobalPartitionInformation();
        for (int i = 0; i < numPartitions; i++) {
            globalPartitionInformation.addPartition(i, Broker.fromString("broker-" + i + " :" + brokerPort));
        }
        return globalPartitionInformation;
    }

    public static SimpleConsumer getKafkaConsumer(KafkaTestBroker broker) {
View Full Code Here

Examples of storm.kafka.trident.GlobalPartitionInformation.addPartition()

        return kafkaConfig;
    }

    private static BrokerHosts getBrokerHosts(KafkaTestBroker broker) {
        GlobalPartitionInformation globalPartitionInformation = new GlobalPartitionInformation();
        globalPartitionInformation.addPartition(0, Broker.fromString(broker.getBrokerConnectionString()));
        return new StaticHosts(globalPartitionInformation);
    }

    public static Config getConfig(String brokerConnectionString) {
        Config config = new Config();
View Full Code Here

Examples of storm.kafka.trident.GlobalPartitionInformation.addPartition()

    @Before
    public void setup() {
        broker = new KafkaTestBroker();
        GlobalPartitionInformation globalPartitionInformation = new GlobalPartitionInformation();
        globalPartitionInformation.addPartition(0, Broker.fromString(broker.getBrokerConnectionString()));
        brokerHosts = new StaticHosts(globalPartitionInformation);
        config = new KafkaConfig(brokerHosts, "testTopic");
        simpleConsumer = new SimpleConsumer("localhost", broker.getPort(), 60000, 1024, "testClient");
    }
View Full Code Here

Examples of storm.kafka.trident.GlobalPartitionInformation.addPartition()

    }


    private void setupKafkaConsumer() {
        GlobalPartitionInformation globalPartitionInformation = new GlobalPartitionInformation();
        globalPartitionInformation.addPartition(0, Broker.fromString(broker.getBrokerConnectionString()));
        BrokerHosts brokerHosts = new StaticHosts(globalPartitionInformation);
        kafkaConfig = new KafkaConfig(brokerHosts, TEST_TOPIC);
        simpleConsumer = new SimpleConsumer("localhost", broker.getPort(), 60000, 1024, "testClient");
    }
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.