Package org.apache.phoenix.parse

Examples of org.apache.phoenix.parse.AlterIndexStatement


        }
        throw new IllegalStateException(); // impossible
    }
   
    private MutationState buildIndex(PTable index, TableRef dataTableRef) throws SQLException {
        AlterIndexStatement indexStatement = null;
        boolean wasAutoCommit = connection.getAutoCommit();
        connection.rollback();
        try {
            connection.setAutoCommit(true);
            PostIndexDDLCompiler compiler = new PostIndexDDLCompiler(connection, dataTableRef);
View Full Code Here


     */
    public void buildPartialIndexFromTimeStamp(PTable index, TableRef dataTableRef) throws SQLException {
        boolean needRestoreIndexState = false;
        // Need to change index state from Disable to InActive when build index partially so that
        // new changes will be indexed during index rebuilding
        AlterIndexStatement indexStatement = FACTORY.alterIndex(FACTORY.namedTable(null,
            TableName.create(index.getSchemaName().getString(), index.getTableName().getString())),
            dataTableRef.getTable().getTableName().getString(), false, PIndexState.INACTIVE);
        alterIndex(indexStatement);
        needRestoreIndexState = true;
        try {
View Full Code Here

   
    private MutationState buildIndex(PTable index, TableRef dataTableRef) throws SQLException {
        PostIndexDDLCompiler compiler = new PostIndexDDLCompiler(connection, dataTableRef);
        MutationPlan plan = compiler.compile(index);
        MutationState state = connection.getQueryServices().updateData(plan);
        AlterIndexStatement indexStatement = FACTORY.alterIndex(FACTORY.namedTable(null,
                TableName.create(index.getSchemaName().getString(), index.getTableName().getString())),
                dataTableRef.getTable().getTableName().getString(), false, PIndexState.ACTIVE);
        alterIndex(indexStatement);
        return state;
    }
View Full Code Here

        try {
            connection.setAutoCommit(true);
            PostIndexDDLCompiler compiler = new PostIndexDDLCompiler(connection, dataTableRef);
            MutationPlan plan = compiler.compile(index);
            MutationState state = connection.getQueryServices().updateData(plan);
            AlterIndexStatement indexStatement = FACTORY.alterIndex(FACTORY.namedTable(null,
                    TableName.create(index.getSchemaName().getString(), index.getTableName().getString())),
                    dataTableRef.getTable().getTableName().getString(), false, PIndexState.ACTIVE);
            alterIndex(indexStatement);
            return state;
        } finally {
View Full Code Here

        }
        throw new IllegalStateException(); // impossible
    }
   
    private MutationState buildIndex(PTable index, TableRef dataTableRef) throws SQLException {
        AlterIndexStatement indexStatement = null;
        boolean wasAutoCommit = connection.getAutoCommit();
        connection.rollback();
        try {
            connection.setAutoCommit(true);
            MutationState state;
View Full Code Here

     */
    public void buildPartialIndexFromTimeStamp(PTable index, TableRef dataTableRef) throws SQLException {
        boolean needRestoreIndexState = false;
        // Need to change index state from Disable to InActive when build index partially so that
        // new changes will be indexed during index rebuilding
        AlterIndexStatement indexStatement = FACTORY.alterIndex(FACTORY.namedTable(null,
            TableName.create(index.getSchemaName().getString(), index.getTableName().getString())),
            dataTableRef.getTable().getTableName().getString(), false, PIndexState.INACTIVE);
        alterIndex(indexStatement);
        needRestoreIndexState = true;
        try {
View Full Code Here

        try {
            connection.setAutoCommit(true);
            PostIndexDDLCompiler compiler = new PostIndexDDLCompiler(connection, dataTableRef);
            MutationPlan plan = compiler.compile(index);
            MutationState state = connection.getQueryServices().updateData(plan);
            AlterIndexStatement indexStatement = FACTORY.alterIndex(FACTORY.namedTable(null,
                    TableName.create(index.getSchemaName().getString(), index.getTableName().getString())),
                    dataTableRef.getTable().getTableName().getString(), false, PIndexState.ACTIVE);
            alterIndex(indexStatement);
            return state;
        } finally {
View Full Code Here

TOP

Related Classes of org.apache.phoenix.parse.AlterIndexStatement

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.