@@ -0,0 +1,2843 @@
+package com.savy3.cobolserde;%0A%0A%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Properties;%0A%0Aimport org.apache.hadoop.conf.Configuration;%0Aimport org.apache.hadoop.hive.serde2.AbstractSerDe;%0Aimport org.apache.hadoop.hive.serde2.SerDeException;%0Aimport org.apache.hadoop.hive.serde2.SerDeStats;%0Aimport org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;%0Aimport org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;%0Aimport org.apache.hadoop.hive.serde2.typeinfo.TypeInfo;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.io.Writable;%0A%0A%0A%0A%0A/**%0A * CobolSerde is under construction currently implemented are%0A * %091. basic alphanumeric%0A * %092. basic numeric%0A * @author Ram Manohar %3Cram.manohar2708@gmail.com%3E%0A */%0Apublic final class CobolSerde extends AbstractSerDe %7B%0A  %0A  private ObjectInspector inspector;%0A//  private String%5B%5D outputFields;%0A  private int numCols;%0A  private ArrayList%3CObject%3E row;%0A  private List%3CTypeInfo%3E columnTypes;%0A  private List%3CList%3CMap%3CString, Integer%3E%3E%3E columnProperties;%0A  %0A  private CobolDeserializer cobolDeserializer = null;%0A  private CobolSerializer cobolSerializer = null;%0A  private CobolCopybook ccb;%0A  %0A    %0A  @Override%0A  public void initialize(final Configuration conf, final Properties tbl) throws SerDeException %7B%0A//%09 System.out.println(tbl.getProperty(Constants.LIST_COLUMN_TYPES).toString());%0A%09  %0A%09this.ccb = new CobolCopybook(tbl.getProperty(%22cobol.layout%22));%0A%09numCols = ccb.getFieldNames().size();%0A%09//System.out.println(%22%22+numCols);%0A%09this.inspector = ObjectInspectorFactory.getStandardStructObjectInspector(ccb.getFieldNames(), ccb.getFieldOIs());%0A%09this.columnTypes = ccb.getFieldTypeInfos();%0A%09this.columnProperties = ccb.getFieldProperties();%0A%09//System.out.println(ccb.getFieldTypes().toString());%0A%09row = new ArrayList%3CObject%3E(numCols);%0A%09for (int i=0; i%3C numCols; i++) %0A%09  row.add(null);%0A  %7D%0A %0A  @Override%0A  public Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException %7B  %0A%09  return new Text(%22Ram%22);%0A  %7D  %0A%0A  @Override%0A  public Object deserialize(final Writable blob) throws SerDeException %7B%0A%09  return getDeserializer().deserialize(this.columnTypes,this.columnProperties,this.numCols, blob);%0A  %7D%0A     %0A  @Override%0A  public ObjectInspector getObjectInspector() throws SerDeException %7B%0A    return inspector;%0A  %7D%0A%0A  @Override%0A  public Class%3C? extends Writable%3E getSerializedClass() %7B%0A    return Text.class;%0A  %7D%0A  %0A  public SerDeStats getSerDeStats() %7B%0A    return null;%0A  %7D%0A  private CobolDeserializer getDeserializer() %7B%0A%09  if(cobolDeserializer == null) %7B%0A%09%09  cobolDeserializer = new CobolDeserializer();%0A%09  %7D%0A%09  return cobolDeserializer;%0A  %7D%0A  %0A  private CobolSerializer getSerializer() %7B%0A%09  if(cobolSerializer == null) %7B%0A%09%09  cobolSerializer = new CobolSerializer();%0A%09  %7D%0A%09  return cobolSerializer;%0A  %7D%0A%7D%0A%0A

Create CobolSerde.java