morningman commented on a change in pull request #3055: [Spark load] FE creates 
spark load job and submits spark etl job
URL: https://github.com/apache/incubator-doris/pull/3055#discussion_r393757291
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/load/loadv2/etl/EtlJobConfig.java
 ##########
 @@ -0,0 +1,263 @@
+// 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.etl;
+
+import com.google.common.collect.Lists;
+
+import java.util.List;
+import java.util.Map;
+
+/** jobconfig.json file format
+ * {
+ *     "tables": {
+ *             10014: {
+ *                     "columns": {
+ *                             "k1": {
+ *                                     "default_value": "\\N",
+ *                                     "column_type": "DATETIME",
+ *                                     "is_allow_null": true
+ *              },
+ *                             "k2": {
+ *                                     "default_value": "0",
+ *                                     "column_type": "SMALLINT",
+ *                                     "is_allow_null": true
+ *              },
+ *                             "v": {
+ *                                     "default_value": "0",
+ *                                     "column_type": "BIGINT",
+ *                                     "is_allow_null": false
+ *              }
+ *          },
+ *                     "indexes": {
+ *                             10014: {
+ *                                     "column_refs": [{
+ *                                             "name": "k1",
+ *                                             "is_key": true,
+ *                                             "aggregation_type": "NONE"
+ *                    }, {
+ *                                             "name": "k2",
+ *                                             "is_key": true,
+ *                                             "aggregation_type": "NONE"
+ *                    }, {
+ *                                             "name": "v",
+ *                                             "is_key": false,
+ *                                             "aggregation_type": "NONE"
+ *                    }],
+ *                  "distribution_column_refs": ["k1"],
+ *                                     "schema_hash": 1294206574
+ *              },
+ *                             10017: {
+ *                                     "column_refs": [{
+ *                                             "name": "k1",
+ *                                             "is_key": true,
+ *                                             "aggregation_type": "NONE"
+ *                    }, {
+ *                                             "name": "v",
+ *                                             "is_key": false,
+ *                                             "aggregation_type": "SUM"
+ *                    }],
+ *                  "distribution_column_refs": ["k1"],
+ *                                     "schema_hash": 1294206575
+ *                }
+ *           },
+ *                     "partition_info": {
+ *                             "partition_type": "RANGE",
+ *                             "partition_column_refs": ["k2"],
+ *                             "partitions": {
+ *                                     10020: {
+ *                                             "start_keys": [-100],
+ *                                             "end_keys": [10],
+ *                                             "is_max_partition": false,
+ *                                             "bucket_num": 3
+ *                  }
+ *              }
+ *          },
+ *                     "file_groups": [{
+ *                     "partitions": [10020],
+ *                             "file_paths": 
["hdfs://hdfs_host:port/user/palo/test/file"],
+ *                             "file_field_names": ["tmp_k1", "k2"],
+ *                             "value_separator": ",",
+ *                         "line_delimiter": "\n"
+ *                             "column_mappings": {
+ *                                     "k1": {
+ *                                             "function_name": "strftime",
+ *                                             "args": ["%Y-%m-%d %H:%M:%S", 
"tmp_k1"]
+ *                   }
+ *              },
+ *                             "where": "k2 > 10",
+ *                             "is_negative": false,
+ *                             "hive_table_name": "hive_db.table"
+ *          }]
+ *      }
+ *  },
+ *     "output_path": 
"hdfs://hdfs_host:port/user/output/10003/label1/1582599203397",
+ *     "output_file_pattern": 
"label1.%(table_id)d.%(partition_id)d.%(index_id)d.%(bucket)d.%(schema_hash)d"
+ * }
+ */
+public class EtlJobConfig {
+    public static final String GLOBAL_DICT_TABLE_NAME = 
"doris_global_dict_table_%d";
+    public static final String DISTINCT_KEY_TABLE_NAME = 
"doris_distinct_key_table_%d_%s";
+    public static final String DORIS_INTERMEDIATE_HIVE_TABLE_NAME = 
"doris_intermediate_hive_table_%d_%s";
+
 
 Review comment:
   This GSON naming policy is `LOWER_CASE_WITH_UNDERSCORES`. But here you use 
CamelCase. Does it matter?

----------------------------------------------------------------
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

Reply via email to