Package org.hpccsystems.spark
Class GenericRowRecordBuilder
- java.lang.Object
-
- org.hpccsystems.spark.GenericRowRecordBuilder
-
- All Implemented Interfaces:
org.hpccsystems.dfs.client.IRecordBuilder
public class GenericRowRecordBuilder extends Object implements org.hpccsystems.dfs.client.IRecordBuilder
An implementation of IRecordBuilder that allows IRecordReader to create Spark GenericRows.
-
-
Constructor Summary
Constructors Constructor Description GenericRowRecordBuilder(org.hpccsystems.commons.ecl.FieldDef recordDef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
finalizeRecord()
Finalize record.org.hpccsystems.dfs.client.IRecordBuilder
getChildRecordBuilder(int index)
Gets the child record builder.org.hpccsystems.commons.ecl.FieldDef
getRecordDefinition()
Gets the record definition.void
setFieldValue(int index, Object value)
Sets the field value.void
setRecordDefinition(org.hpccsystems.commons.ecl.FieldDef fieldDef)
Sets the record definition.void
startRecord()
Start record.
-
-
-
Constructor Detail
-
GenericRowRecordBuilder
public GenericRowRecordBuilder(org.hpccsystems.commons.ecl.FieldDef recordDef) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
-
Method Detail
-
setRecordDefinition
public void setRecordDefinition(org.hpccsystems.commons.ecl.FieldDef fieldDef) throws IllegalArgumentException
Description copied from interface:org.hpccsystems.dfs.client.IRecordBuilder
Sets the record definition.- Specified by:
setRecordDefinition
in interfaceorg.hpccsystems.dfs.client.IRecordBuilder
- Parameters:
fieldDef
- the new record definition- Throws:
IllegalArgumentException
- the illegal argument exception
-
getRecordDefinition
public org.hpccsystems.commons.ecl.FieldDef getRecordDefinition()
Description copied from interface:org.hpccsystems.dfs.client.IRecordBuilder
Gets the record definition.- Specified by:
getRecordDefinition
in interfaceorg.hpccsystems.dfs.client.IRecordBuilder
- Returns:
- the record definition
-
startRecord
public void startRecord() throws InstantiationException
Description copied from interface:org.hpccsystems.dfs.client.IRecordBuilder
Start record.- Specified by:
startRecord
in interfaceorg.hpccsystems.dfs.client.IRecordBuilder
- Throws:
InstantiationException
- the instantiation exception
-
finalizeRecord
public Object finalizeRecord() throws InstantiationException
Description copied from interface:org.hpccsystems.dfs.client.IRecordBuilder
Finalize record.- Specified by:
finalizeRecord
in interfaceorg.hpccsystems.dfs.client.IRecordBuilder
- Returns:
- the object
- Throws:
InstantiationException
- the instantiation exception
-
setFieldValue
public void setFieldValue(int index, Object value) throws IllegalArgumentException, IllegalAccessException
Description copied from interface:org.hpccsystems.dfs.client.IRecordBuilder
Sets the field value.- Specified by:
setFieldValue
in interfaceorg.hpccsystems.dfs.client.IRecordBuilder
- Parameters:
index
- the indexvalue
- the value- Throws:
IllegalArgumentException
- the illegal argument exceptionIllegalAccessException
- the illegal access exception
-
getChildRecordBuilder
public org.hpccsystems.dfs.client.IRecordBuilder getChildRecordBuilder(int index)
Description copied from interface:org.hpccsystems.dfs.client.IRecordBuilder
Gets the child record builder.- Specified by:
getChildRecordBuilder
in interfaceorg.hpccsystems.dfs.client.IRecordBuilder
- Parameters:
index
- the index- Returns:
- the child record builder
-
-