Package com.foundationdb.ais.model

Examples of com.foundationdb.ais.model.IndexName


        }

        @Override
        public void visit(Index index) {
            Index prev = current.put(index.getIndexId(), index);
            IndexName name = index.getIndexName();
            if(prev != null) {
                failures.reportFailure(new AISValidationFailure(new DuplicateIndexIdException(prev.getIndexName(), name)));
            }
            Integer indexID = index.getIndexId();
            if((indexID == null) || (indexID <= 0)) {
View Full Code Here


                               @PathParam("table") String table,
                               @PathParam("index") String index,
                               @QueryParam("q") final String query,
                               @QueryParam("depth") final Integer depth,
                               @QueryParam("size") final Integer limit) throws Exception {
        final IndexName indexName = new IndexName(ResourceHelper.parseTableName(request, table), index);
        ResourceHelper.checkSchemaAccessible(reqs.securityService, request, indexName.getSchemaName());
        return RestResponseBuilder
                .forRequest(request)
                .body(new RestResponseBuilder.BodyGenerator() {
                    @Override
                    public void write(PrintWriter writer) throws Exception {
View Full Code Here

            }
        }

        public synchronized void offer(Index index) {
            if (active) {
                IndexName entry = index.getIndexName();
                if (!queue.contains(entry)) {
                    if (queue.offer(entry)) {
                        if (thread == null) {
                            thread = new Thread(this, "IndexStatistics-Background");
                            thread.start();
View Full Code Here

        @Override
        public void run() {
            try (Session session = sessionService.createSession()) {
                while (active) {
                    IndexName entry;
                    synchronized (this) {
                        entry = queue.poll();
                        if (entry == null) {
                            thread = null;
                            break;
View Full Code Here

    public static List<String> makeTablePath(String pathPrefix, String schemaName, String tableName) {
        return Arrays.asList(pathPrefix, TABLE_PATH_NAME, schemaName, tableName);
    }

    public static List<String> makeIndexPath(String pathPrefix, Index index) {
        IndexName name = index.getIndexName();
        return Arrays.asList(pathPrefix, TABLE_PATH_NAME, name.getSchemaName(), name.getTableName(), name.getName());
    }
View Full Code Here

                // Only interact with FullTextIndexInfo under lock as to not fight concurrent DROP
                synchronized(BACKGROUND_UPDATE_LOCK) {
                    FullTextIndexInfo indexInfo = null;
                    try(HKeyBytesStream rows = new HKeyBytesStream(session)) {
                        if(rows.hasStream()) {
                            IndexName name = rows.getIndexName();
                            indexInfo = getIndexIfExists(session, name, null);
                            if(indexInfo == null) {
                                // Index has been deleted. Will conflict on so give up.
                                break;
                            } else {
View Full Code Here

            indexName = null;
            while((row = cursor.next()) != null) {
                String schema = row.value(0).getString();
                String tableName = row.value(1).getString();
                String iName = row.value(2).getString();
                indexName = new IndexName(new TableName(schema, tableName), iName);
                indexID = row.value(3).getInt32();

                Table table = getAIS(session).getTable(indexName.getFullTableName());
                Index index = (table != null) ? table.getFullTextIndex(indexName.getName()) : null;
                // May have been deleted or recreated
View Full Code Here

    public FullTextIndexInfo(FullTextIndexShared shared) {
        this.shared = shared;
    }

    public void init(AkibanInformationSchema ais) {
        IndexName name = shared.getName();
        Table table = ais.getTable(name.getFullTableName());
        if (table == null) {
            throw new NoSuchTableException(name.getFullTableName());
        }
        index = table.getFullTextIndex(name.getName());
        if (index == null) {
            NoSuchIndexException ret =  new NoSuchIndexException(name.getName());
            ret.printStackTrace();
            throw ret;
        }
        schema = SchemaCache.globalSchema(ais);
        indexedRowType = schema.tableRowType(table);
View Full Code Here

TOP

Related Classes of com.foundationdb.ais.model.IndexName

Copyright © 2018 www.massapicom. 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.