Examples of Partition


Examples of edu.yale.cs.hadoopdb.catalog.xml.Partition

      n.setLocation(node);

      for(String relation : relations_unchunked){
        Relation r = factory.createRelation();
        r.setId(relation);
        Partition p = factory.createPartition();
        p.setId(new Integer(node_counter).toString());
        p.setUrl(properties.getProperty(URL_PREFIX) + node + ":" + properties.getProperty(PORT)
            + "/" + properties.getProperty(UNCHUNKED_DB_PREFIX) + node_counter);
        r.getPartitions().add(p);
        n.getRelations().add(r);
      }
     
     
      for(String relation : relations_chunked){
        Relation r = factory.createRelation();
        r.setId(relation);
       
        int start_index = node_counter*(new Integer(properties.getProperty(CHUNKS_PER_NODE)));
        for(int index = start_index; index < start_index + (new Integer(properties.getProperty(CHUNKS_PER_NODE))); index ++) {
          Partition p = factory.createPartition();
          p.setId(new Integer(index).toString());
          p.setUrl(properties.getProperty(URL_PREFIX) + node + ":" + properties.getProperty(PORT)
              + "/" + properties.getProperty(CHUNKED_DB_PREFIX) + index);
          r.getPartitions().add(p);
        }
        n.getRelations().add(r);
      }     
View Full Code Here

Examples of org.apache.cassandra.stress.generate.Partition

                        rateLimiter.acquire(batchSize);

                    int partitionCount = 0;
                    while (partitionCount < batchSize)
                    {
                        Partition p = op.generator.generate(op);
                        if (p == null)
                            break;
                        partitions[partitionCount++] = p;
                    }
View Full Code Here

Examples of org.apache.directory.ldapstudio.apacheds.configuration.model.Partition

                deleteButton.setEnabled( !event.getSelection().isEmpty() );
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( partition.isSystemPartition() )
                    {
                        deleteButton.setEnabled( false );
                    }
                }
            }
        } );

        addButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                Partition newPartition = new Partition( getNewName() );
                partitions.add( newPartition );
                viewer.refresh();
                viewer.setSelection( new StructuredSelection( newPartition ) );
                setEditorDirty();
            }
        } );

        deleteButton.addSelectionListener( new SelectionAdapter()
        {
            public void widgetSelected( SelectionEvent e )
            {
                StructuredSelection selection = ( StructuredSelection ) viewer.getSelection();
                if ( !selection.isEmpty() )
                {
                    Partition partition = ( Partition ) selection.getFirstElement();
                    if ( !partition.isSystemPartition() )
                    {
                        partitions.remove( partition );
                        viewer.refresh();
                        setEditorDirty();
                    }
View Full Code Here

Examples of org.apache.directory.server.core.api.partition.Partition

    {
        /** A structure to hold all the partitions */
        DnNode<Partition> partitionLookupTree = new DnNode<Partition>();

        Dn suffix = new Dn( schemaManager, "dc=example, dc=com" );
        Partition partition = new JdbmPartition( schemaManager, dnFactory );
        partition.setSuffixDn( suffix );

        partitionLookupTree.add( suffix, partition );

        assertNotNull( partitionLookupTree );
        assertTrue( partitionLookupTree.hasChildren() );
View Full Code Here

Examples of org.apache.directory.server.core.api.partition.Partition

    {
        /** A structure to hold all the partitions */
        DnNode<Partition> partitionLookupTree = new DnNode<Partition>();

        Dn suffix1 = new Dn( schemaManager, "dc=example, dc=com" );
        Partition partition1 = new JdbmPartition( schemaManager, dnFactory );
        partition1.setSuffixDn( suffix1 );

        partitionLookupTree.add( suffix1, partition1 );

        Dn suffix2 = new Dn( schemaManager, "ou=system" );
        Partition partition2 = new JdbmPartition( schemaManager, dnFactory );
        partition2.setSuffixDn( suffix2 );

        partitionLookupTree.add( suffix2, partition2 );

        assertNotNull( partitionLookupTree );
        assertTrue( partitionLookupTree.hasChildren() );
View Full Code Here

Examples of org.apache.directory.server.core.api.partition.Partition

    {
        /** A structure to hold all the partitions */
        DnNode<Partition> partitionLookupTree = new DnNode<Partition>();

        Dn suffix1 = new Dn( schemaManager, "dc=example1, dc=com" );
        Partition partition1 = new JdbmPartition( schemaManager, dnFactory );
        partition1.setSuffixDn( suffix1 );

        partitionLookupTree.add( suffix1, partition1 );

        Dn suffix2 = new Dn( schemaManager, "dc=example2, dc=com" );
        Partition partition2 = new JdbmPartition( schemaManager, dnFactory );
        partition2.setSuffixDn( suffix2 );

        partitionLookupTree.add( suffix2, partition2 );

        assertNotNull( partitionLookupTree );

View Full Code Here

Examples of org.apache.directory.server.core.api.partition.Partition

    @Test
    public void testAddAndRemove() throws Exception
    {
        DirectoryServiceFactory dsFactory = DefaultDirectoryServiceFactory.class.newInstance();
        PartitionFactory partitionFactory = dsFactory.getPartitionFactory();
        Partition partition = partitionFactory.createPartition( getService().getSchemaManager(),
            getService().getDnFactory(), "removable",
            "ou=removable", 100, getService()
                .getInstanceLayout().getPartitionsDirectory() );

        // Test AddContextPartition
        getService().addPartition( partition );

        Dn suffixDn = new Dn( getService().getSchemaManager(), "ou=removable" );

        Entry ctxEntry = new DefaultEntry(
            getService().getSchemaManager(),
            suffixDn.toString(),
            "objectClass: top",
            "objectClass: organizationalUnit",
            "ou: removable",
            "entryCSN", new CsnFactory( 1 ).newInstance().toString(),
            "entryUUID", UUID.randomUUID().toString() );

        partition.add( new AddOperationContext( getService().getAdminSession(), ctxEntry ) );

        LdapConnection connection = IntegrationUtils.getAdminConnection( getService() );

        assertNotNull( connection.lookup( "ou=removable" ) );
View Full Code Here

Examples of org.apache.directory.server.core.api.partition.Partition

        InetSocketAddress address = ( InetSocketAddress ) session.getIoSession().getRemoteAddress();
        String hostName = address.getAddress().getHostName();

        ExprNode modifiedFilter = modifyFilter( session, request );

        Partition partition = dirService.getPartitionNexus().getPartition( request.getBase() );
        String contextCsn = partition.getContextCsn();

        boolean refreshNPersist = isRefreshNPersist( request );

        // first register a ReplicaEventLog before starting the initial content refresh
        // this is to log all the operations happen on DIT during initial content refresh
View Full Code Here

Examples of org.apache.directory.server.core.api.partition.Partition

        // change the working directory to something that is unique
        // on the system and somewhere either under target directory
        // or somewhere in a temp area of the machine.

        // Inject the System Partition
        Partition systemPartition = partitionFactory.createPartition( directoryService.getSchemaManager(),
            directoryService.getDnFactory(),
            "system", ServerDNConstants.SYSTEM_DN, 500,
            new File( directoryService.getInstanceLayout().getPartitionsDirectory(), "system" ) );
        systemPartition.setSchemaManager( directoryService.getSchemaManager() );

        partitionFactory.addIndex( systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100 );

        directoryService.setSystemPartition( systemPartition );
    }
View Full Code Here

Examples of org.apache.directory.server.core.api.partition.Partition

    }


    private void initializeSystemPartition() throws Exception
    {
        Partition system = getSystemPartition();

        // Add root context entry for system partition
        Dn systemSuffixDn = getDnFactory().create( ServerDNConstants.SYSTEM_DN );
        CoreSession adminSession = getAdminSession();

        if ( !system.hasEntry( new HasEntryOperationContext( adminSession, systemSuffixDn ) ) )
        {
            Entry systemEntry = new DefaultEntry( schemaManager, systemSuffixDn );

            // Add the ObjectClasses
            systemEntry.put( SchemaConstants.OBJECT_CLASS_AT, SchemaConstants.TOP_OC,
                SchemaConstants.ORGANIZATIONAL_UNIT_OC, SchemaConstants.EXTENSIBLE_OBJECT_OC );

            // Add some operational attributes
            systemEntry.put( SchemaConstants.CREATORS_NAME_AT, ServerDNConstants.ADMIN_SYSTEM_DN );
            systemEntry.put( SchemaConstants.CREATE_TIMESTAMP_AT, DateUtils.getGeneralizedTime() );
            systemEntry.add( SchemaConstants.ENTRY_CSN_AT, getCSN().toString() );
            systemEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
            systemEntry.put( DnUtils.getRdnAttributeType( ServerDNConstants.SYSTEM_DN ), DnUtils
                .getRdnValue( ServerDNConstants.SYSTEM_DN ) );

            AddOperationContext addOperationContext = new AddOperationContext( adminSession, systemEntry );
            system.add( addOperationContext );
        }
    }
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.