Package gorsat.process
Class SparkRowUtilities
- java.lang.Object
-
- gorsat.process.SparkRowUtilities
-
public class SparkRowUtilities extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SparkRowUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>createMapList(java.util.Map<java.lang.String,java.lang.String> createMap, java.util.Map<java.lang.String,java.lang.String> defMap, java.lang.String creates)static java.lang.StringcreateMapString(java.util.Map<java.lang.String,java.lang.String> createMap, java.util.Map<java.lang.String,java.lang.String> defMap, java.lang.String creates)static java.lang.StringgenerateTempViewName(java.lang.String fileName, boolean usegorpipe, java.lang.String filter, java.lang.String chr, int pos, int end)static org.apache.spark.sql.types.StructTypegor2Schema(java.lang.String header, org.gorpipe.gor.model.Row types)static GorDataTypegorCmdSchema(java.lang.String[] gorcmds, org.gorpipe.spark.GorSparkSession gorSparkSession)static GorDataTypegorCmdSchema(java.lang.String gorcmd, org.gorpipe.spark.GorSparkSession gorSparkSession, boolean nor)static GorDataTypeinferDataTypes(java.nio.file.Path filePath, java.lang.String fileName, boolean isGorz, boolean nor)static org.apache.spark.sql.types.StructTypeinferSchema(java.nio.file.Path filePath, java.lang.String fileName, boolean nor, boolean isGorz)static org.apache.spark.sql.Dataset<? extends org.apache.spark.sql.Row>registerFile(java.lang.String[] fns, java.lang.String name, java.lang.String profile, org.gorpipe.spark.GorSparkSession gorSparkSession, java.lang.String standalone, java.nio.file.Path fileroot, java.nio.file.Path cacheDir, boolean usestreaming, java.lang.String filter, java.lang.String filterFile, java.lang.String filterColumn, java.lang.String splitFile, boolean nor, java.lang.String chr, int pos, int end, java.lang.String jobid, java.lang.String cacheFile, boolean cpp, boolean tag)static java.lang.StringtranslatePath(java.lang.String fn, java.nio.file.Path fileroot, java.lang.String standalone)static GorDataTypetypeFromParquetLine(org.gorpipe.gor.model.ParquetLine pl, boolean withStart, java.lang.String[] header)static GorDataTypetypeFromStream(java.util.stream.Stream<java.lang.String> linestream, boolean withStart, java.lang.String[] headerArray, boolean nor)static GorDataTypetypeFromStream(java.util.stream.Stream<java.lang.String> linestream, boolean withStart, java.lang.String[] headerArray, boolean nor, boolean base128)
-
-
-
Method Detail
-
createMapString
public static java.lang.String createMapString(java.util.Map<java.lang.String,java.lang.String> createMap, java.util.Map<java.lang.String,java.lang.String> defMap, java.lang.String creates)
-
createMapList
public static java.util.List<java.lang.String> createMapList(java.util.Map<java.lang.String,java.lang.String> createMap, java.util.Map<java.lang.String,java.lang.String> defMap, java.lang.String creates)
-
generateTempViewName
public static java.lang.String generateTempViewName(java.lang.String fileName, boolean usegorpipe, java.lang.String filter, java.lang.String chr, int pos, int end)
-
gor2Schema
public static org.apache.spark.sql.types.StructType gor2Schema(java.lang.String header, org.gorpipe.gor.model.Row types)
-
inferSchema
public static org.apache.spark.sql.types.StructType inferSchema(java.nio.file.Path filePath, java.lang.String fileName, boolean nor, boolean isGorz) throws java.io.IOException, java.util.zip.DataFormatException- Throws:
java.io.IOExceptionjava.util.zip.DataFormatException
-
translatePath
public static java.lang.String translatePath(java.lang.String fn, java.nio.file.Path fileroot, java.lang.String standalone)
-
gorCmdSchema
public static GorDataType gorCmdSchema(java.lang.String gorcmd, org.gorpipe.spark.GorSparkSession gorSparkSession, boolean nor)
-
gorCmdSchema
public static GorDataType gorCmdSchema(java.lang.String[] gorcmds, org.gorpipe.spark.GorSparkSession gorSparkSession)
-
registerFile
public static org.apache.spark.sql.Dataset<? extends org.apache.spark.sql.Row> registerFile(java.lang.String[] fns, java.lang.String name, java.lang.String profile, org.gorpipe.spark.GorSparkSession gorSparkSession, java.lang.String standalone, java.nio.file.Path fileroot, java.nio.file.Path cacheDir, boolean usestreaming, java.lang.String filter, java.lang.String filterFile, java.lang.String filterColumn, java.lang.String splitFile, boolean nor, java.lang.String chr, int pos, int end, java.lang.String jobid, java.lang.String cacheFile, boolean cpp, boolean tag) throws java.io.IOException, java.util.zip.DataFormatException- Throws:
java.io.IOExceptionjava.util.zip.DataFormatException
-
inferDataTypes
public static GorDataType inferDataTypes(java.nio.file.Path filePath, java.lang.String fileName, boolean isGorz, boolean nor) throws java.io.IOException, java.util.zip.DataFormatException
- Throws:
java.io.IOExceptionjava.util.zip.DataFormatException
-
typeFromParquetLine
public static GorDataType typeFromParquetLine(org.gorpipe.gor.model.ParquetLine pl, boolean withStart, java.lang.String[] header)
-
typeFromStream
public static GorDataType typeFromStream(java.util.stream.Stream<java.lang.String> linestream, boolean withStart, java.lang.String[] headerArray, boolean nor)
-
typeFromStream
public static GorDataType typeFromStream(java.util.stream.Stream<java.lang.String> linestream, boolean withStart, java.lang.String[] headerArray, boolean nor, boolean base128)
-
-