Examples of IndexInfo


Examples of org.apache.cassandra.io.sstable.IndexHelper.IndexInfo

            // Are we done?
            if (lastDeserializedBlock < 0 || lastDeserializedBlock >= indexes.size())
                return false;

            IndexInfo currentIndex = indexes.get(lastDeserializedBlock);

            /* seek to the correct offset to the data, and calculate the data size */
            long positionToSeek = columnsStart + currentIndex.offset;

            // With new promoted indexes, our first seek in the data file will happen at that point.
View Full Code Here

Examples of org.apache.cassandra.io.sstable.IndexHelper.IndexInfo

                if (nextIndexIdx < 0 || nextIndexIdx >= indexes.size())
                    // no index block for that slice
                    continue;

                // Check if we can exclude this slice entirely from the index
                IndexInfo info = indexes.get(nextIndexIdx);
                if (reversed)
                {
                    if (!isBeforeSliceStart(info.lastName))
                        return true;
                }
View Full Code Here

Examples of org.apache.cassandra.io.sstable.IndexHelper.IndexInfo

            // Are we done?
            if (lastDeserializedBlock < 0 || lastDeserializedBlock >= indexes.size())
                return false;

            IndexInfo currentIndex = indexes.get(lastDeserializedBlock);

            /* seek to the correct offset to the data, and calculate the data size */
            long positionToSeek = basePosition + currentIndex.offset;

            // With new promoted indexes, our first seek in the data file will happen at that point.
View Full Code Here

Examples of org.apache.cassandra.io.sstable.IndexHelper.IndexInfo

                if (nextIndexIdx < 0 || nextIndexIdx >= indexes.size())
                    // no index block for that slice
                    continue;

                // Check if we can exclude this slice entirely from the index
                IndexInfo info = indexes.get(nextIndexIdx);
                if (reversed)
                {
                    if (!isBeforeSliceStart(info.lastName))
                        return true;
                }
View Full Code Here

Examples of org.apache.cassandra.io.sstable.IndexHelper.IndexInfo

            // Are we done?
            if (lastDeserializedBlock < 0 || lastDeserializedBlock >= indexes.size())
                return false;

            IndexInfo currentIndex = indexes.get(lastDeserializedBlock);

            /* seek to the correct offset to the data, and calculate the data size */
            long positionToSeek = basePosition + currentIndex.offset;

            // With new promoted indexes, our first seek in the data file will happen at that point.
View Full Code Here

Examples of org.datanucleus.store.rdbms.schema.IndexInfo

                new Object[] {this});
            IdentifierFactory idFactory = storeMgr.getIdentifierFactory();
            Iterator indexIter = tableIndexInfo.getChildren().iterator();
            while (indexIter.hasNext())
            {
                IndexInfo indexInfo = (IndexInfo)indexIter.next();
                boolean isUnique = !((Boolean)indexInfo.getProperty("non_unique")).booleanValue();
                if (isUnique)
                {
                    // Only utilise unique indexes
                    short idxType = ((Short)indexInfo.getProperty("type")).shortValue();
                    if (idxType == DatabaseMetaData.tableIndexStatistic)
                    {
                        // Ignore
                        continue;
                    }
   
                    String keyName = (String)indexInfo.getProperty("index_name");
                    DatastoreIdentifier idxName = idFactory.newIdentifier(IdentifierType.CANDIDATE_KEY, keyName);
                    CandidateKey key = (CandidateKey) candidateKeysByName.get(idxName);
                    if (key == null)
                    {
                        key = new CandidateKey(this);
                        key.setName(keyName);
                        candidateKeysByName.put(idxName, key);
                    }
   
                    // Set the column
                    int colSeq = ((Short)indexInfo.getProperty("ordinal_position")).shortValue() - 1;
                    DatastoreIdentifier colName = idFactory.newIdentifier(IdentifierType.COLUMN,
                        (String)indexInfo.getProperty("column_name"));
                    Column col = columnsByName.get(colName);
                    if (col != null)
                    {
                        key.setDatastoreField(colSeq, col);
                    }
View Full Code Here

Examples of org.datanucleus.store.rdbms.schema.IndexInfo

                new Object[] {this});
            IdentifierFactory idFactory = storeMgr.getIdentifierFactory();
            Iterator indexIter = tableIndexInfo.getChildren().iterator();
            while (indexIter.hasNext())
            {
                IndexInfo indexInfo = (IndexInfo)indexIter.next();
                short idxType = ((Short)indexInfo.getProperty("type")).shortValue();
                if (idxType == DatabaseMetaData.tableIndexStatistic)
                {
                    // Ignore
                    continue;
                }
   
                String indexName = (String)indexInfo.getProperty("index_name");
                DatastoreIdentifier indexIdentifier = idFactory.newIdentifier(IdentifierType.CANDIDATE_KEY,
                    indexName);
                Index idx = (Index) indicesByName.get(indexIdentifier);
                if (idx == null)
                {
                    boolean isUnique = !((Boolean)indexInfo.getProperty("non_unique")).booleanValue();
                    idx = new Index(this, isUnique, null);
                    idx.setName(indexName);
                    indicesByName.put(indexIdentifier, idx);
                }
   
                // Set the column
                int colSeq = ((Short)indexInfo.getProperty("ordinal_position")).shortValue() - 1;
                DatastoreIdentifier colName = idFactory.newIdentifier(IdentifierType.COLUMN,
                    (String)indexInfo.getProperty("column_name"));
                Column col = columnsByName.get(colName);
                if (col != null)
                {
                    idx.setColumn(colSeq, col);
                }
View Full Code Here

Examples of org.exist.collections.IndexInfo

            tm = db.getTransactionManager();
            txn = tm.beginTransaction();

            FileInputSource is = new FileInputSource(file);
         
            final IndexInfo info = collection.validateXMLResource(txn, broker, uri.lastSegment(), is);
//          info.getDocument().getMetadata().setMimeType(mimeType.getName());
 
          is = new FileInputSource(file);
          collection.store(txn, broker, info, is, false);
View Full Code Here

Examples of org.exist.collections.IndexInfo

               
                final File file = broker.getBinaryFile((BinaryDocument) doc);

                FileInputSource is = new FileInputSource(file);
               
                final IndexInfo info = destination.validateXMLResource(txn, broker, newName, is);
                info.getDocument().getMetadata().setMimeType(mimeType.getName());

                is = new FileInputSource(file);
                destination.store(txn, broker, info, is, false);
               
                source.removeBinaryResource(txn, broker, doc);
View Full Code Here

Examples of org.exist.collections.IndexInfo

      InputStream is = null;
      try {
        if (mimeType.isXMLType()) {
          // store as xml resource
          final String str = "<empty/>";
          final IndexInfo info = collection.validateXMLResource(transaction, broker, fileName, str);
          info.getDocument().getMetadata().setMimeType(mimeType.getName());
          info.getDocument().getPermissions().setMode(DEFAULT_RESOURCE_PERM);
          collection.store(transaction, broker, info, str, false);
 
        } else {
          // store as binary resource
          is = new ByteArrayInputStream("".getBytes(UTF_8));
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.