Codota Logo
DefaultHCatRecord
Code IndexAdd Codota to your IDE (free)

How to use
DefaultHCatRecord
in
org.apache.hive.hcatalog.data

Best Java code snippets using org.apache.hive.hcatalog.data.DefaultHCatRecord (Showing top 20 results out of 315)

  • Common ways to obtain DefaultHCatRecord
private void myMethod () {
DefaultHCatRecord d =
  • Codota Iconnew DefaultHCatRecord()
  • Codota IconHCatSchema hCatSchema;new DefaultHCatRecord(hCatSchema.size())
  • Smart code suggestions by Codota
}
origin: apache/hive

private static HCatRecord getRecord(int i) {
 List<Object> list = new ArrayList<Object>(2);
 list.add("Row #: " + i);
 list.add(i);
 return new DefaultHCatRecord(list);
}
origin: apache/hive

 public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
  String[] cols = value.toString().split(",");
  DefaultHCatRecord record = new DefaultHCatRecord(3);
  record.set(0, Integer.parseInt(cols[0]));
  record.set(1, cols[1]);
  record.set(2, cols[2]);
  context.write(NullWritable.get(), record);
 }
}
origin: apache/hive

 /**
  * Convert this LazyHCatRecord to a DefaultHCatRecord.  This is required
  * before you can write out a record via write.
  * @return an HCatRecord that can be serialized
  * @throws HCatException
  */
 public HCatRecord getWritable() throws HCatException {
  DefaultHCatRecord d = new DefaultHCatRecord();
  d.copy(this);
  return d;
 }
}
origin: apache/hive

@Override
public void set(String fieldName, HCatSchema recordSchema, Object value) throws HCatException {
 set(recordSchema.getPosition(fieldName), value);
}
origin: apache/hive

@Override
public void write(DataOutput out) throws IOException {
 int sz = size();
 out.writeInt(sz);
 for (int i = 0; i < sz; i++) {
  ReaderWriter.writeDatum(out, contents.get(i));
 }
}
origin: apache/hive

@Override
public Object get(String fieldName, HCatSchema recordSchema) throws HCatException {
 return get(recordSchema.getPosition(fieldName));
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

@Override
public void set(String fieldName, HCatSchema recordSchema, Object value) throws HCatException {
 set(recordSchema.getPosition(fieldName), value);
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

@Override
public void write(DataOutput out) throws IOException {
 int sz = size();
 out.writeInt(sz);
 for (int i = 0; i < sz; i++) {
  ReaderWriter.writeDatum(out, contents.get(i));
 }
}
origin: com.facebook.presto.hive/hive-apache

@Override
public Object get(String fieldName, HCatSchema recordSchema) throws HCatException {
 return get(recordSchema.getPosition(fieldName));
}
origin: apache/hive

protected static void generateWriteRecords(int max, int mod, int offset) {
 writeRecords = new ArrayList<HCatRecord>();
 for (int i = 0; i < max; i++) {
  List<Object> objList = new ArrayList<Object>();
  objList.add(i);
  objList.add("strvalue" + i);
  objList.add(String.valueOf((i % mod) + offset));
  writeRecords.add(new DefaultHCatRecord(objList));
 }
}
origin: apache/hive

DefaultHCatRecord dr = new DefaultHCatRecord(outputSchema.size());
int i = 0;
for (String fieldName : outputSchema.getFieldNames()) {
 if (dataSchema.getPosition(fieldName) != null) {
  dr.set(i, r.get(fieldName, dataSchema));
 } else {
  dr.set(i, valuesNotInDataCols.get(fieldName));
origin: org.apache.hive.hcatalog/hive-hcatalog-core

 /**
  * Convert this LazyHCatRecord to a DefaultHCatRecord.  This is required
  * before you can write out a record via write.
  * @return an HCatRecord that can be serialized
  * @throws HCatException
  */
 public HCatRecord getWritable() throws HCatException {
  DefaultHCatRecord d = new DefaultHCatRecord();
  d.copy(this);
  return d;
 }
}
origin: com.facebook.presto.hive/hive-apache

@Override
public void set(String fieldName, HCatSchema recordSchema, Object value) throws HCatException {
 set(recordSchema.getPosition(fieldName), value);
}
origin: com.github.hyukjinkwon.hcatalog/hive-hcatalog-core

@Override
public void write(DataOutput out) throws IOException {
 int sz = size();
 out.writeInt(sz);
 for (int i = 0; i < sz; i++) {
  ReaderWriter.writeDatum(out, contents.get(i));
 }
}
origin: org.apache.hive.hcatalog/hive-hcatalog-core

@Override
public Object get(String fieldName, HCatSchema recordSchema) throws HCatException {
 return get(recordSchema.getPosition(fieldName));
}
origin: apache/hive

private HCatRecord getHCatRecord() throws Exception {
 List<Object> rec_1 = new ArrayList<Object>(4);
 rec_1.add( new Integer(INT_CONST));
 rec_1.add( new Long(LONG_CONST));
 rec_1.add( new Double(DOUBLE_CONST));
 rec_1.add( new String(STRING_CONST));
 return new DefaultHCatRecord(rec_1);
}
origin: apache/sqoop

private List<HCatRecord> generateHCatRecords(int numRecords,
 HCatSchema hCatTblSchema, ColumnGenerator... extraCols) throws Exception {
 List<HCatRecord> records = new ArrayList<HCatRecord>();
 List<HCatFieldSchema> hCatTblCols = hCatTblSchema.getFields();
 int size = hCatTblCols.size();
 for (int i = 0; i < numRecords; ++i) {
  DefaultHCatRecord record = new DefaultHCatRecord(size);
  record.set(hCatTblCols.get(0).getName(), hCatTblSchema, i);
  record.set(hCatTblCols.get(1).getName(), hCatTblSchema, "textfield" + i);
  int idx = 0;
  for (int j = 0; j < extraCols.length; ++j) {
   if (extraCols[j].getKeyType() == KeyType.STATIC_KEY) {
    continue;
   }
   record.set(hCatTblCols.get(idx + 2).getName(), hCatTblSchema,
    extraCols[j].getHCatValue(i));
   ++idx;
  }
  records.add(record);
 }
 return records;
}
origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

 /**
  * Convert this LazyHCatRecord to a DefaultHCatRecord.  This is required
  * before you can write out a record via write.
  * @return an HCatRecord that can be serialized
  * @throws HCatException
  */
 public HCatRecord getWritable() throws HCatException {
  DefaultHCatRecord d = new DefaultHCatRecord();
  d.copy(this);
  return d;
 }
}
origin: org.spark-project.hive.hcatalog/hive-hcatalog-core

@Override
public void set(String fieldName, HCatSchema recordSchema, Object value) throws HCatException {
 set(recordSchema.getPosition(fieldName), value);
}
origin: com.facebook.presto.hive/hive-apache

@Override
public void write(DataOutput out) throws IOException {
 int sz = size();
 out.writeInt(sz);
 for (int i = 0; i < sz; i++) {
  ReaderWriter.writeDatum(out, contents.get(i));
 }
}
org.apache.hive.hcatalog.dataDefaultHCatRecord

Most used methods

  • <init>
  • set
  • copy
  • get
  • size

Popular in Java

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • String (java.lang)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BoxLayout (javax.swing)
  • JCheckBox (javax.swing)
  • Join (org.hibernate.mapping)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now