Examples of readFields()


Examples of org.apache.nutch.webapp.common.Search.readFields()

        ByteArrayInputStream is=new ByteArrayInputStream(w.getContents());
        GZIPInputStream gs = new GZIPInputStream(is);
        DataInputStream dis = new DataInputStream(gs);

        search = new Search(locator);
        search.readFields(dis);
        long delta=System.currentTimeMillis()-time;
       
        if(LOG.isDebugEnabled()){
          LOG.debug("Decompressing cache entry took: " + delta + "ms.");
        }
View Full Code Here

Examples of org.apache.oozie.WorkflowActionBean.readFields()

        DataOutputStream dos = new DataOutputStream(baos);
        action.write(dos);
        dos.close();
        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(baos.toByteArray()));
        action = new WorkflowActionBean();
        action.readFields(dis);
    }

    public void testFullWriteRead() throws Exception {
        //TODO
    }
View Full Code Here

Examples of org.apache.oozie.WorkflowJobBean.readFields()

        DataOutputStream dos = new DataOutputStream(baos);
        workflow.write(dos);
        dos.close();
        DataInputStream dis = new DataInputStream(new ByteArrayInputStream(baos.toByteArray()));
        workflow = new WorkflowJobBean();
        workflow.readFields(dis);

    }

    public void testFullWriteRead() throws Exception {
        //TODO
View Full Code Here

Examples of org.apache.phoenix.expression.Expression.readFields()

                int nExprs = WritableUtils.readVInt(input);
                joinExpressions[i] = new ArrayList<Expression>(nExprs);
                for (int j = 0; j < nExprs; j++) {
                    int expressionOrdinal = WritableUtils.readVInt(input);
                    Expression expression = ExpressionType.values()[expressionOrdinal].newInstance();
                    expression.readFields(input);
                    joinExpressions[i].add(expression);
                }
                int type = WritableUtils.readVInt(input);
                joinTypes[i] = JoinType.values()[type];
                earlyEvaluation[i] = input.readBoolean();
View Full Code Here

Examples of org.apache.phoenix.expression.KeyValueColumnExpression.readFields()

        try {
            DataInputStream input = new DataInputStream(stream);
            int arrayKVRefSize = WritableUtils.readVInt(input);
            for (int i = 0; i < arrayKVRefSize; i++) {
                KeyValueColumnExpression kvExp = new KeyValueColumnExpression();
                kvExp.readFields(input);
                arrayKVRefs.add(kvExp);
            }
            int arrayKVFuncSize = WritableUtils.readVInt(input);
            Expression[] arrayFuncRefs = new Expression[arrayKVFuncSize];
            for (int i = 0; i < arrayKVFuncSize; i++) {
View Full Code Here

Examples of org.apache.phoenix.expression.OrderByExpression.readFields()

            int estimatedRowSize = WritableUtils.readVInt(input);
            int size = WritableUtils.readVInt(input);
            List<OrderByExpression> orderByExpressions = Lists.newArrayListWithExpectedSize(size);          
            for (int i = 0; i < size; i++) {
                OrderByExpression orderByExpression = new OrderByExpression();
                orderByExpression.readFields(input);
                orderByExpressions.add(orderByExpression);
            }
            ResultIterator inner = new RegionScannerResultIterator(s);
            return new OrderedResultIterator(inner, orderByExpressions, thresholdBytes, limit >= 0 ? limit : null, estimatedRowSize);
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.phoenix.expression.function.ArrayIndexFunction.readFields()

            }
            int arrayKVFuncSize = WritableUtils.readVInt(input);
            Expression[] arrayFuncRefs = new Expression[arrayKVFuncSize];
            for (int i = 0; i < arrayKVFuncSize; i++) {
                ArrayIndexFunction arrayIdxFunc = new ArrayIndexFunction();
                arrayIdxFunc.readFields(input);
                arrayFuncRefs[i] = arrayIdxFunc;
                builder.addField(arrayIdxFunc);
            }
            kvSchema = builder.build();
            kvSchemaBitSet = ValueBitSet.newInstance(kvSchema);
View Full Code Here

Examples of org.apache.phoenix.expression.function.SingleAggregateFunction.readFields()

            Aggregator[] aggregators = new Aggregator[len];
            Expression[] expressions = new Expression[len];
            SingleAggregateFunction[] functions = new SingleAggregateFunction[len];
            for (int i = 0; i < aggregators.length; i++) {
                SingleAggregateFunction aggFunc = (SingleAggregateFunction)ExpressionType.values()[WritableUtils.readVInt(input)].newInstance();
                aggFunc.readFields(input, conf);
                functions[i] = aggFunc;
                aggregators[i] = aggFunc.getAggregator();
                expressions[i] = aggFunc.getAggregatorExpression();
            }
            return new ServerAggregators(functions, aggregators,expressions, minNullableIndex);
View Full Code Here

Examples of org.apache.phoenix.query.KeyRange.readFields()

            int orlen = in.readInt();
            List<KeyRange> orclause = Lists.newArrayListWithExpectedSize(orlen);
            slots.add(orclause);
            for (int j=0; j<orlen; j++) {
                KeyRange range = new KeyRange();
                range.readFields(in);
                orclause.add(range);
            }
        }
        this.init(slots, schema);
    }
View Full Code Here

Examples of org.apache.phoenix.schema.KeyValueSchema.readFields()

        }
        ByteArrayInputStream stream = new ByteArrayInputStream(proj);
        try {
            DataInputStream input = new DataInputStream(stream);
            KeyValueSchema schema = new KeyValueSchema();
            schema.readFields(input);
            int count = WritableUtils.readVInt(input);
            Expression[] expressions = new Expression[count];
            for (int i = 0; i < count; i++) {
              int ordinal = WritableUtils.readVInt(input);
              expressions[i] = ExpressionType.values()[ordinal].newInstance();
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.