Package com.inadco.hbl.client

Examples of com.inadco.hbl.client.HblQueryClient


    @Override
    public List<InputSplit> getSplits(JobContext context) throws IOException, InterruptedException {
        try {
            Configuration conf = context.getConfiguration();
            HblQueryClient hblQueryClient = new HblQueryClient(conf);

            PreparedAggregateQueryImpl paq = (PreparedAggregateQueryImpl) hblQueryClient.createPreparedQuery();
            paq.prepare(getHblQuery(conf));

            int paramNo = getParamNo(conf);
            for (int i = 0; i < paramNo; i++)
                paq.setHblParameter(i, getParamNo(conf));
View Full Code Here


            public void initialize(InputSplit split, TaskAttemptContext context) throws IOException,
                InterruptedException {

                try {
                    Configuration conf = context.getConfiguration();
                    HblQueryClient hblQueryClient = new HblQueryClient(conf);
                    HblInputSplit hblSplit = (HblInputSplit) split;

                    PreparedAggregateQueryImpl paq = (PreparedAggregateQueryImpl) hblQueryClient.createPreparedQuery();
                    paq.prepare(getHblQuery(conf));

                    String cuboidTableName = hblSplit.getCuboidTable();
                    if (cuboidTableName == null)
                        throw new HblException("Invalid cuboid name at backend. Something in MR happened wrong.");
View Full Code Here

            // ////////////////////////////////////

            if (!QUERY_ONLY)
                runScript(script, inputPath);

            queryClient = new HblQueryClient(getConf());
            closeables.addFirst(queryClient);

            testClient1(cubeName);
            testClient2(cubeName);
            testClient3(cubeName);
View Full Code Here

    }

    private void testClient3(String cubeName) throws IOException, HblException {
        Deque<Closeable> closeables = new ArrayDeque<Closeable>();
        try {
            HblQueryClient queryClient = new HblQueryClient(getConf());
            closeables.addFirst(queryClient);

            byte ids[][] = new byte[2][];
            ids[0] = new byte[16];
            ids[1] = new byte[16];
            HblUtil.incrementKey(ids[1], 0, 16);

            /**
             * same as client2 but print the summaries separately (no grouping).
             * This is obviously not terribly useful, the queries have got to
             * have group specification -- -- unless we group up all of it.
             */
            AggregateQuery query = queryClient.createQuery();

            query.setCube(cubeName).addMeasure("impCnt").addMeasure("click");
            query.addClosedSlice("dim1", ids[0], ids[1])/* .addGroupBy("dim1") */;
            AggregateResultSet rs = query.execute();
            closeables.addFirst(rs);
View Full Code Here

TOP

Related Classes of com.inadco.hbl.client.HblQueryClient

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.