Github user mravi commented on a diff in the pull request: https://github.com/apache/incubator-phoenix/pull/22#discussion_r10860095 --- Diff: phoenix-pig/src/main/java/org/apache/phoenix/pig/hadoop/PhoenixInputSplit.java --- @@ -0,0 +1,185 @@ +/* + * Copyright 2010 The Apache Software Foundation + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + *distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you maynot use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicablelaw or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.phoenix.pig.hadoop; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInput; +import java.io.DataInputStream; +import java.io.DataOutput; +import java.io.DataOutputStream; +import java.io.IOException; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.client.Scan; +import org.apache.hadoop.hbase.util.Base64; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.io.Writable; +import org.apache.hadoop.io.WritableUtils; +import org.apache.hadoop.mapreduce.InputSplit; +import org.apache.phoenix.compile.ColumnProjector; +import org.apache.phoenix.compile.ExpressionProjector; +import org.apache.phoenix.expression.Expression; +import org.apache.phoenix.expression.ExpressionType; + +import com.google.common.collect.Lists; + +public class PhoenixInputSplit extends InputSplit implements Writable { + + private static final Log LOG = LogFactory.getLog(PhoenixInputSplit.class); + private byte [] tableName; + private String scan = ""; + private String regionLocation; + private List<? extends ColumnProjector> columnProjectors; --- End diff -- The ColumnProjectors help in deserializing the column values and I need to pass them to the RecordReader. Since the framework instantiates PhoenixInputFormat twice, once during getSplits(in front end) and the next during createRecordReader (in backend), I use PhoenixInputSplit as a vehicle to carry the ColumnProjectors.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---