Home >
Back-end > Sparksql application, read 170 w TXT text, slow speed
Sparksql application, read 170 w TXT text, slow speed
Good Montana, self-study, spark and found sparksql do data analysis, is in line with their own tastes. So myself through a series of logic, to make the following code
The import com. Twitter. Chill. Base64;
The import com.yitian.bankPay.spark.com mon. DateList;
The import com.yitian.bankPay.spark.com mon. HBaseUtils;
Import org, apache hadoop. Conf. Configuration;
Import org, apache hadoop. Hbase. Client. Result;
Import org, apache hadoop. Hbase. Client. Scan;
Import org, apache hadoop. Hbase. IO. ImmutableBytesWritable;
Import org, apache hadoop. Hbase. Graphs. TableInputFormat;
Import org, apache hadoop. Hbase. Protobuf. ProtobufUtil;
Import org, apache hadoop. Hbase. Protobuf. Generated. ClientProtos;
Import org, apache hadoop. Hbase. Util. Bytes;
The import org. Apache. Spark. SparkConf;
The import org. Apache. Spark. API. Java. JavaPairRDD;
The import org. Apache. Spark. API. Java. JavaRDD;
The import org. Apache. Spark. API. Java. JavaSparkContext;
The import org. Apache. Spark. API. Java. The function. The function;
Import org. Apache. Spark. API. Java function. Function2;
Import org. Apache. Spark. API. Java function. PairFunction;
The import org. Apache. Spark. SQL. *;
The import org. Apache. Spark. SQL. Types. The DataTypes.
The import org. Apache. Spark. SQL. Types. StructField;
The import org. Apache. Spark. SQL. Types. StructType;
The import scala. Tuple2;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
Public class CustomerStatistices {
Public static List