kangkaisen commented on a change in pull request #3296: spark data preparation process, issue #3295 URL: https://github.com/apache/incubator-doris/pull/3296#discussion_r407071305
########## File path: fe/src/main/java/org/apache/doris/load/loadv2/dpp/SparkDpp.java ########## @@ -0,0 +1,848 @@ +// 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 may not 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 applicable law 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.doris.load.loadv2.dpp; + +import com.google.common.base.Strings; +import com.google.gson.Gson; +import org.apache.doris.common.UserException; +import org.apache.doris.load.loadv2.etl.EtlJobConfig; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.conf.Configuration; +import org.apache.parquet.column.ParquetProperties; +import org.apache.parquet.example.data.Group; +import org.apache.parquet.example.data.simple.SimpleGroupFactory; +import org.apache.parquet.hadoop.ParquetWriter; +import org.apache.parquet.hadoop.example.GroupWriteSupport; +import org.apache.parquet.hadoop.metadata.CompressionCodecName; +import org.apache.parquet.schema.MessageType; +import org.apache.parquet.schema.OriginalType; +import org.apache.parquet.schema.PrimitiveType; +import org.apache.parquet.schema.Types; +import org.apache.spark.Partitioner; +import org.apache.spark.api.java.function.ForeachPartitionFunction; +import org.apache.spark.api.java.function.PairFlatMapFunction; +import org.apache.spark.sql.functions; +import org.apache.spark.sql.RowFactory; +import org.apache.spark.sql.Row; +import org.apache.spark.sql.Dataset; +import org.apache.spark.sql.Column; +import org.apache.spark.sql.SparkSession; +import org.apache.spark.sql.functions; +import org.apache.spark.sql.types.DataType; +import org.apache.spark.sql.types.DataTypes; +import org.apache.spark.sql.types.StructField; +import org.apache.spark.sql.types.StructType; +import org.apache.spark.sql.expressions.UserDefinedAggregateFunction; +import org.apache.spark.util.LongAccumulator; +import scala.Tuple2; +import scala.collection.Seq; + +import org.apache.spark.api.java.JavaPairRDD; +import org.apache.spark.api.java.JavaRDD; + +import java.math.BigInteger; +import java.net.URI; +import java.util.Map; +import java.util.Set; +import java.util.List; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Queue; +import java.util.LinkedList; +import java.util.HashSet; +import java.util.Arrays; + +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.FSDataOutputStream; +import scala.collection.JavaConverters; + +// This class is a Spark-based data preprocessing program, +// which will make use of the distributed compute framework of spark to +// do ETL job/sort/preaggregate/convert data format job in spark job +// to boost the process of large amount of data load. +public final class SparkDpp implements java.io.Serializable { Review comment: Please add a detail comment to describe the work flow, Such as: step1 : xx step2: xxx step3:xxx ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org