Package org.apache.hadoop.hbase.hbql.client

Examples of org.apache.hadoop.hbase.hbql.client.ExecutionResults


        this.getMappingContext().validateMappingName(conn);

        final TableMapping tableMapping = this.getMappingContext().getTableMapping();

        if (tableMapping == null)
            return new ExecutionResults("Unknown mapping: " + this.getMappingContext().getMappingName());
        else
            return new ExecutionResults(tableMapping.asString());
    }
View Full Code Here


        }
        catch (InterruptedException e) {
            throw new HBqlException(e);
        }

        return new ExecutionResults("Table " + this.getTableName() + (isMajor ? " major" : "") + " compacted.");
    }
View Full Code Here

        }
        else {
            AsyncExecutorManager.dropAsyncExecutor(this.getName());
            msg = "Async Executor " + this.getName() + " dropped.";
        }
        return new ExecutionResults(msg);
    }
View Full Code Here

    public ExecutionResults evaluatePredicateAndExecute(final HConnectionImpl conn) throws HBqlException {
        if (this.getPredicate() == null || this.getPredicate().evaluate(conn)) {
            return this.execute(conn);
        }
        else {
            final ExecutionResults results = new ExecutionResults("False predicate");
            results.setPredicate(false);
            return results;
        }
    }
View Full Code Here

        AsyncExecutorManager.newAsyncExecutor(this.getArgs().getName(),
                                              this.getArgs().getMinThreadCount(),
                                              this.getArgs().getMaxThreadCount(),
                                              this.getArgs().getKeepAliveSecs());

        return new ExecutionResults("Async executor " + this.getArgs().getName() + " created.");
    }
View Full Code Here

    protected ExecutionResults execute(final HConnectionImpl conn) throws HBqlException {

        final HTableDescriptor tableDesc = conn.getHTableDescriptor(this.getTableName());

        final ExecutionResults retval = new ExecutionResults();
        retval.out.println("Table name: " + tableDesc.getNameAsString());
        retval.out.println("\nFamilies:");
        for (final HColumnDescriptor columnDesc : tableDesc.getFamilies()) {
            retval.out.println("  " + columnDesc.getNameAsString()
                               + "\n    Max versions: " + columnDesc.getMaxVersions()
View Full Code Here

    }

    protected ExecutionResults execute(final HConnectionImpl conn) throws HBqlException {

        conn.dropTable(this.getTableName());
        return new ExecutionResults("Table " + this.getTableName() + " dropped.");
    }
View Full Code Here

    protected ExecutionResults execute(final HConnectionImpl conn) throws HBqlException {

        try {
            final HBaseAdmin admin = conn.getHBaseAdmin();

            final ExecutionResults retval = new ExecutionResults();
            retval.out.println("Tables: ");
            for (final HTableDescriptor tableDesc : admin.listTables())
                retval.out.println("\t" + tableDesc.getNameAsString());

            retval.out.flush();
View Full Code Here

                                                      this.getArgs().getMaxThreadCount(),
                                                      this.getArgs().getKeepAliveSecs(),
                                                      this.getArgs().getThreadsReadResults(),
                                                      this.getArgs().getCompletionQueueSize());

        return new ExecutionResults("Query executor pool " + this.getArgs().getPoolName() + " created.");
    }
View Full Code Here

        if (var == null)
            throw new HBqlException("Error in SET command");

        if (var.equalsIgnoreCase("packagepath")) {
            EnvVars.setPackagePath(this.getValue());
            return new ExecutionResults("PackagePath set to " + this.getValue());
        }

        throw new HBqlException("Unknown variable: " + var);
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.hbql.client.ExecutionResults

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.