/
CarbonCommonConstants.java
2162 lines (1743 loc) · 66.1 KB
/
CarbonCommonConstants.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* 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.carbondata.core.constants;
import java.nio.charset.Charset;
import org.apache.carbondata.common.annotations.InterfaceStability;
import org.apache.carbondata.core.util.annotations.CarbonProperty;
public final class CarbonCommonConstants {
private CarbonCommonConstants() {
}
//////////////////////////////////////////////////////////////////////////////////////////
// System level property start here
//////////////////////////////////////////////////////////////////////////////////////////
// System level property is the global property for CarbonData
// application, these properties are stored in a singleton instance
// so that all processing logic in CarbonData uses the same
// property value
/**
* location of the carbon member, hierarchy and fact files
*/
@CarbonProperty
public static final String STORE_LOCATION = "carbon.storelocation";
/**
* blocklet size in carbon file
*/
@CarbonProperty
public static final String BLOCKLET_SIZE = "carbon.blocklet.size";
/**
* default blocklet size
*/
public static final String BLOCKLET_SIZE_DEFAULT_VAL = "120000";
/**
* min blocklet size
*/
public static final int BLOCKLET_SIZE_MIN_VAL = 2000;
/**
* max blocklet size
*/
public static final int BLOCKLET_SIZE_MAX_VAL = 12000000;
/**
* min block size in MB
*/
public static final int BLOCK_SIZE_MIN_VAL = 1;
/**
* max block size in MB
*/
public static final int BLOCK_SIZE_MAX_VAL = 2048;
/**
* carbon properties file path
*/
@CarbonProperty
public static final String CARBON_PROPERTIES_FILE_PATH = "carbon.properties.filepath";
/**
* default carbon properties file path
*/
public static final String CARBON_PROPERTIES_FILE_PATH_DEFAULT =
"../../../conf/carbon.properties";
/**
* CARBON_DDL_BASE_HDFS_URL
*/
@CarbonProperty
public static final String CARBON_DDL_BASE_HDFS_URL = "carbon.ddl.base.hdfs.url";
/**
* CARBON_BADRECORDS_LOCATION
*/
@CarbonProperty
public static final String CARBON_BADRECORDS_LOC = "carbon.badRecords.location";
/**
* CARBON_BADRECORDS_LOCATION_DEFAULT
*/
public static final String CARBON_BADRECORDS_LOC_DEFAULT_VAL = "";
/**
* Property for specifying the format of TIMESTAMP data type column.
* e.g. yyyy/MM/dd HH:mm:ss, or using default value
*/
@CarbonProperty
public static final String CARBON_TIMESTAMP_FORMAT = "carbon.timestamp.format";
/**
* default value
*/
public static final String CARBON_TIMESTAMP_DEFAULT_FORMAT = "yyyy-MM-dd HH:mm:ss";
/**
* CARBON_TIMESTAMP
*/
public static final String CARBON_TIMESTAMP = "dd-MM-yyyy HH:mm:ss";
/**
* CARBON_TIMESTAMP
*/
public static final String CARBON_TIMESTAMP_MILLIS = "dd-MM-yyyy HH:mm:ss:SSS";
/**
* Property for specifying the format of DATE data type column.
* e.g. yyyy/MM/dd , or using default value
*/
@CarbonProperty
public static final String CARBON_DATE_FORMAT = "carbon.date.format";
/**
* default value
*/
public static final String CARBON_DATE_DEFAULT_FORMAT = "yyyy-MM-dd";
/**
* compressor for writing/reading CarbonData file
*/
@CarbonProperty
public static final String COMPRESSOR = "carbon.column.compressor";
/**
* default compressor is snappy
*/
public static final String DEFAULT_COMPRESSOR = "snappy";
/**
* ZOOKEEPER_ENABLE_LOCK if this is set to true then zookeeper
* will be used to handle locking
* mechanism of carbon
*/
@CarbonProperty
public static final String LOCK_TYPE = "carbon.lock.type";
/**
* ZOOKEEPER_ENABLE_DEFAULT the default value for zookeeper will be true for carbon
*/
public static final String LOCK_TYPE_DEFAULT = "LOCALLOCK";
/**
* Specifies the path where the lock files have to be created.
* By default, lock files are created in table path.
*/
@CarbonProperty
public static final String LOCK_PATH = "carbon.lock.path";
public static final String LOCK_PATH_DEFAULT = "";
/**
* ZOOKEEPER_LOCATION this is the location in zookeeper file system where locks are created.
* mechanism of carbon
*/
public static final String ZOOKEEPER_LOCATION = "/CarbonLocks";
/**
* xxhash algorithm property for hashmap
*/
@CarbonProperty
public static final String ENABLE_XXHASH = "carbon.enableXXHash";
/**
* xxhash algorithm property for hashmap Default value false
*/
public static final String ENABLE_XXHASH_DEFAULT = "true";
/**
* System property to enable or disable local dictionary generation
*/
@CarbonProperty
public static final String LOCAL_DICTIONARY_SYSTEM_ENABLE = "carbon.local.dictionary.enable";
/**
* System property to enable or disable decoder based local dictionary fallback
*/
@CarbonProperty
public static final String LOCAL_DICTIONARY_DECODER_BASED_FALLBACK =
"carbon.local.dictionary.decoder.fallback";
/**
* System property to enable or disable decoder based local dictionary fallback default value
*/
public static final String LOCAL_DICTIONARY_DECODER_BASED_FALLBACK_DEFAULT = "true";
/**
* zookeeper url key
*/
@CarbonProperty
public static final String ZOOKEEPER_URL = "spark.deploy.zookeeper.url";
/**
* carbon data file version property
*/
@CarbonProperty
public static final String CARBON_DATA_FILE_VERSION = "carbon.data.file.version";
@CarbonProperty
public static final String SPARK_SCHEMA_STRING_LENGTH_THRESHOLD =
"spark.sql.sources.schemaStringLengthThreshold";
public static final int SPARK_SCHEMA_STRING_LENGTH_THRESHOLD_DEFAULT = 4000;
@CarbonProperty
public static final String CARBON_BAD_RECORDS_ACTION = "carbon.bad.records.action";
/**
* FAIL action will fail the load in case of bad records in loading data
*/
public static final String CARBON_BAD_RECORDS_ACTION_DEFAULT = "FAIL";
@CarbonProperty
public static final String ENABLE_HIVE_SCHEMA_META_STORE = "spark.carbon.hive.schema.store";
public static final String ENABLE_HIVE_SCHEMA_META_STORE_DEFAULT = "false";
/**
* There is more often that in production uses different drivers for load and queries. So in case
* of load driver user should set this property to enable loader specific clean up.
*/
@CarbonProperty
public static final String DATA_MANAGEMENT_DRIVER = "spark.carbon.datamanagement.driver";
public static final String DATA_MANAGEMENT_DRIVER_DEFAULT = "true";
@CarbonProperty
public static final String CARBON_SESSIONSTATE_CLASSNAME = "spark.carbon.sessionstate.classname";
/**
* This property will be used to configure the sqlastbuilder class.
*/
@CarbonProperty
public static final String CARBON_SQLASTBUILDER_CLASSNAME =
"spark.carbon.sqlastbuilder.classname";
public static final String CARBON_SQLASTBUILDER_CLASSNAME_DEFAULT =
"org.apache.spark.sql.hive.CarbonSqlAstBuilder";
@CarbonProperty
public static final String CARBON_LEASE_RECOVERY_RETRY_COUNT =
"carbon.lease.recovery.retry.count";
public static final String CARBON_LEASE_RECOVERY_RETRY_COUNT_DEFAULT = "5";
public static final int CARBON_LEASE_RECOVERY_RETRY_COUNT_MIN = 1;
public static final int CARBON_LEASE_RECOVERY_RETRY_COUNT_MAX = 50;
@CarbonProperty
public static final String CARBON_LEASE_RECOVERY_RETRY_INTERVAL =
"carbon.lease.recovery.retry.interval";
public static final String CARBON_LEASE_RECOVERY_RETRY_INTERVAL_DEFAULT = "1000";
public static final int CARBON_LEASE_RECOVERY_RETRY_INTERVAL_MIN = 1000;
public static final int CARBON_LEASE_RECOVERY_RETRY_INTERVAL_MAX = 10000;
@CarbonProperty
public static final String CARBON_SECURE_DICTIONARY_SERVER =
"carbon.secure.dictionary.server";
public static final String CARBON_SECURE_DICTIONARY_SERVER_DEFAULT = "true";
/**
* ENABLE_CALCULATE_DATA_INDEX_SIZE
*/
@CarbonProperty
public static final String ENABLE_CALCULATE_SIZE = "carbon.enable.calculate.size";
/**
* default value of ENABLE_CALCULATE_DATA_INDEX_SIZE
*/
public static final String DEFAULT_ENABLE_CALCULATE_SIZE = "true";
/**
* this will be used to skip / ignore empty lines while loading
*/
@CarbonProperty
public static final String CARBON_SKIP_EMPTY_LINE = "carbon.skip.empty.line";
public static final String CARBON_SKIP_EMPTY_LINE_DEFAULT = "false";
/**
* Currently the segment lock files are not deleted immediately when unlock,
* this value indicates the number of hours the segment lock files will be preserved.
*/
@CarbonProperty
public static final String CARBON_SEGMENT_LOCK_FILES_PRESERVE_HOURS =
"carbon.segment.lock.files.preserve.hours";
/**
* default value is 2 days
*/
public static final String CARBON_SEGMENT_LOCK_FILES_PRESERVE_HOURS_DEFAULT = "48";
/**
* The number of invisible segment info which will be preserved in tablestatus file,
* if it exceeds this value, they will be removed and write to tablestatus.history file.
*/
@CarbonProperty
public static final String CARBON_INVISIBLE_SEGMENTS_PRESERVE_COUNT =
"carbon.invisible.segments.preserve.count";
/**
* default value is 200, it means that it will preserve 200 invisible segment info
* in tablestatus file.
* The size of one segment info is about 500 bytes, so the size of tablestatus file
* will remain at 100KB.
*/
public static final String CARBON_INVISIBLE_SEGMENTS_PRESERVE_COUNT_DEFAULT = "200";
/**
* System older location to store system level data like datamap schema and status files.
*/
@CarbonProperty
public static final String CARBON_SYSTEM_FOLDER_LOCATION = "carbon.system.folder.location";
/**
* It is internal configuration and used only for test purpose.
* It will merge the carbon index files with in the segment to single segment.
*/
@CarbonProperty
public static final String CARBON_MERGE_INDEX_IN_SEGMENT =
"carbon.merge.index.in.segment";
public static final String CARBON_MERGE_INDEX_IN_SEGMENT_DEFAULT = "true";
/**
* property to be used for specifying the max byte limit for string/varchar data type till
* where storing min/max in data file will be considered
*/
@CarbonProperty
public static final String CARBON_MINMAX_ALLOWED_BYTE_COUNT =
"carbon.minmax.allowed.byte.count";
public static final String CARBON_MINMAX_ALLOWED_BYTE_COUNT_DEFAULT = "200";
//////////////////////////////////////////////////////////////////////////////////////////
// Table level property start here
//////////////////////////////////////////////////////////////////////////////////////////
// Table level property is the table property for Carbon table
// Flat folder support on table. when it is true all CarbonData files store directly under table
// path instead of sub folders.
public static final String FLAT_FOLDER = "flat_folder";
/**
* FLAT_FOLDER default value
*/
public static final String DEFAULT_FLAT_FOLDER = "false";
public static final String DICTIONARY_EXCLUDE = "dictionary_exclude";
public static final String DICTIONARY_INCLUDE = "dictionary_include";
public static final String LONG_STRING_COLUMNS = "long_string_columns";
/**
* Table property to enable or disable local dictionary generation
*/
public static final String LOCAL_DICTIONARY_ENABLE = "local_dictionary_enable";
/**
* default value for local dictionary generation
*/
public static final String LOCAL_DICTIONARY_ENABLE_DEFAULT = "true";
/**
* Threshold value for local dictionary
*/
public static final String LOCAL_DICTIONARY_THRESHOLD = "local_dictionary_threshold";
/**
* default value for local dictionary
*/
public static final String LOCAL_DICTIONARY_THRESHOLD_DEFAULT = "10000";
/**
* max dictionary threshold
*/
public static final int LOCAL_DICTIONARY_MAX = 100000;
/**
* min dictionary threshold
*/
public static final int LOCAL_DICTIONARY_MIN = 1000;
/**
* Table property to specify the columns for which local dictionary needs to be generated.
*/
public static final String LOCAL_DICTIONARY_INCLUDE = "local_dictionary_include";
/**
* Table property to specify the columns for which local dictionary should not be to be generated.
*/
public static final String LOCAL_DICTIONARY_EXCLUDE = "local_dictionary_exclude";
/**
* DMPROPERTY for Index DataMap, like lucene, bloomfilter DataMap,
* to indicate a list of column name to be indexed
*/
public static final String INDEX_COLUMNS = "INDEX_COLUMNS";
/**
* key for dictionary path
*/
public static final String DICTIONARY_PATH = "dictionary_path";
public static final String SORT_COLUMNS = "sort_columns";
public static final String SORT_SCOPE = "sort_scope";
public static final String RANGE_COLUMN = "range_column";
public static final String PARTITION_TYPE = "partition_type";
public static final String NUM_PARTITIONS = "num_partitions";
public static final String RANGE_INFO = "range_info";
public static final String LIST_INFO = "list_info";
public static final String COLUMN_PROPERTIES = "columnproperties";
// table block size in MB
public static final String TABLE_BLOCKSIZE = "table_blocksize";
// default block size in MB
public static final String TABLE_BLOCK_SIZE_DEFAULT = "1024";
// table blocklet size in MB
public static final String TABLE_BLOCKLET_SIZE = "table_blocklet_size";
// default blocklet size value in MB
public static final String TABLE_BLOCKLET_SIZE_DEFAULT = "64";
/**
* set in column level to disable inverted index
* @Deprecated :This property is deprecated, it is kept just for compatibility
*/
public static final String NO_INVERTED_INDEX = "no_inverted_index";
// set in column level to enable inverted index
public static final String INVERTED_INDEX = "inverted_index";
// table property name of major compaction size
public static final String TABLE_MAJOR_COMPACTION_SIZE = "major_compaction_size";
// table property name of auto load merge
public static final String TABLE_AUTO_LOAD_MERGE = "auto_load_merge";
// table property name of compaction level threshold
public static final String TABLE_COMPACTION_LEVEL_THRESHOLD = "compaction_level_threshold";
// table property name of preserve segments numbers while compaction
public static final String TABLE_COMPACTION_PRESERVE_SEGMENTS = "compaction_preserve_segments";
// table property name of allowed compaction days while compaction
public static final String TABLE_ALLOWED_COMPACTION_DAYS = "allowed_compaction_days";
/**
* property to be specified for caching min/max of required columns
*/
public static final String COLUMN_META_CACHE = "column_meta_cache";
/**
* property to be specified for caching level (Block/Blocket)
*/
public static final String CACHE_LEVEL = "cache_level";
/**
* default value for cache level
*/
public static final String CACHE_LEVEL_DEFAULT_VALUE = "BLOCK";
/**
* column level property: the measure is changed to the dimension
*/
public static final String COLUMN_DRIFT = "column_drift";
//////////////////////////////////////////////////////////////////////////////////////////
// Data loading parameter start here
//////////////////////////////////////////////////////////////////////////////////////////
/**
* Number of cores to be used while loading
*/
@CarbonProperty(dynamicConfigurable = true)
public static final String NUM_CORES_LOADING = "carbon.number.of.cores.while.loading";
/**
* default value of number of cores to be used
*/
public static final String NUM_CORES_DEFAULT_VAL = "2";
/**
* Number of cores to be used while compacting
*/
@CarbonProperty(dynamicConfigurable = true)
public static final String NUM_CORES_COMPACTING = "carbon.number.of.cores.while.compacting";
/**
* Number of cores to be used while alter partition
*/
@CarbonProperty
public static final String NUM_CORES_ALT_PARTITION = "carbon.number.of.cores.while.altPartition";
/**
* BYTEBUFFER_SIZE
*/
public static final int BYTEBUFFER_SIZE = 24 * 1024;
/**
* SORT_TEMP_FILE_LOCATION
*/
public static final String SORT_TEMP_FILE_LOCATION = "sortrowtmp";
/**
* SORT_INTERMEDIATE_FILES_LIMIT
*/
@CarbonProperty
public static final String SORT_INTERMEDIATE_FILES_LIMIT = "carbon.sort.intermediate.files.limit";
/**
* SORT_INTERMEDIATE_FILES_LIMIT_DEFAULT_VALUE
*/
public static final String SORT_INTERMEDIATE_FILES_LIMIT_DEFAULT_VALUE = "20";
public static final int SORT_INTERMEDIATE_FILES_LIMIT_MIN = 2;
public static final int SORT_INTERMEDIATE_FILES_LIMIT_MAX = 50;
/**
* SORT_FILE_WRITE_BUFFER_SIZE
*/
@CarbonProperty
public static final String CARBON_SORT_FILE_WRITE_BUFFER_SIZE =
"carbon.sort.file.write.buffer.size";
/**
* SORT_FILE_WRITE_BUFFER_SIZE_DEFAULT_VALUE
*/
public static final String CARBON_SORT_FILE_WRITE_BUFFER_SIZE_DEFAULT_VALUE = "16384";
public static final int CARBON_SORT_FILE_WRITE_BUFFER_SIZE_MIN = 10240;
public static final int CARBON_SORT_FILE_WRITE_BUFFER_SIZE_MAX = 10485760;
/**
* CSV_READ_BUFFER_SIZE
*/
@CarbonProperty
public static final String CSV_READ_BUFFER_SIZE = "carbon.csv.read.buffersize.byte";
/**
* CSV_READ_BUFFER_SIZE
* default value is 1mb
*/
public static final String CSV_READ_BUFFER_SIZE_DEFAULT = "1048576";
/**
* min value for csv read buffer size, 10 kb
*/
public static final int CSV_READ_BUFFER_SIZE_MIN = 10240;
/**
* max value for csv read buffer size, 10 mb
*/
public static final int CSV_READ_BUFFER_SIZE_MAX = 10485760;
/**
* CARBON_MERGE_SORT_READER_THREAD
*/
@CarbonProperty
public static final String CARBON_MERGE_SORT_READER_THREAD = "carbon.merge.sort.reader.thread";
/**
* CARBON_MERGE_SORT_READER_THREAD DEFAULT value
*/
public static final String CARBON_MERGE_SORT_READER_THREAD_DEFAULTVALUE = "3";
/**
* TIME_STAT_UTIL_TYPE
*/
@CarbonProperty
public static final String ENABLE_DATA_LOADING_STATISTICS = "enable.data.loading.statistics";
/**
* TIME_STAT_UTIL_TYPE_DEFAULT
*/
public static final String ENABLE_DATA_LOADING_STATISTICS_DEFAULT = "false";
/**
* NUMBER_OF_TRIES_FOR_LOAD_METADATA_LOCK
*/
@CarbonProperty
public static final String NUMBER_OF_TRIES_FOR_CONCURRENT_LOCK =
"carbon.concurrent.lock.retries";
/**
* NUMBER_OF_TRIES_FOR_LOAD_METADATA_LOCK.
*
* Because we want concurrent loads to be completed even if they have to wait for the lock
* therefore taking the default as 100.
*
* Example: Concurrent loads will use this to wait to acquire the table status lock.
*/
public static final int NUMBER_OF_TRIES_FOR_CONCURRENT_LOCK_DEFAULT = 100;
/**
* MAX_TIMEOUT_FOR_LOAD_METADATA_LOCK
*/
@CarbonProperty
public static final String MAX_TIMEOUT_FOR_CONCURRENT_LOCK =
"carbon.concurrent.lock.retry.timeout.sec";
/**
* MAX_TIMEOUT_FOR_LOAD_METADATA_LOCK
*
* Example: Concurrent loads will use this to wait to acquire the table status lock.
*/
public static final int MAX_TIMEOUT_FOR_CONCURRENT_LOCK_DEFAULT = 1;
/**
* NUMBER_OF_TRIES_FOR_CARBON_LOCK
*/
@CarbonProperty
public static final String NUMBER_OF_TRIES_FOR_CARBON_LOCK =
"carbon.lock.retries";
/**
* NUMBER_OF_TRIES_FOR_CARBON_LOCK
*/
public static final int NUMBER_OF_TRIES_FOR_CARBON_LOCK_DEFAULT = 3;
/**
* MAX_TIMEOUT_FOR_CARBON_LOCK
*/
@CarbonProperty
public static final String MAX_TIMEOUT_FOR_CARBON_LOCK =
"carbon.lock.retry.timeout.sec";
/**
* MAX_TIMEOUT_FOR_CARBON_LOCK
*/
public static final int MAX_TIMEOUT_FOR_CARBON_LOCK_DEFAULT = 5;
/**
* CARBON_PREFETCH_BUFFERSIZE
*/
@CarbonProperty
public static final String CARBON_PREFETCH_BUFFERSIZE = "carbon.prefetch.buffersize";
/**
* CARBON_PREFETCH_BUFFERSIZE DEFAULT VALUE
*/
public static final String CARBON_PREFETCH_BUFFERSIZE_DEFAULT = "1000";
/**
* CARBON_PREFETCH_IN_MERGE
*/
public static final boolean CARBON_PREFETCH_IN_MERGE_VALUE = false;
/**
* ENABLE_AUTO_LOAD_MERGE
*/
@CarbonProperty(dynamicConfigurable = true)
public static final String ENABLE_AUTO_LOAD_MERGE = "carbon.enable.auto.load.merge";
/**
* DEFAULT value of ENABLE_AUTO_LOAD_MERGE
*/
public static final String DEFAULT_ENABLE_AUTO_LOAD_MERGE = "false";
/**
* maximum dictionary chunk size that can be kept in memory while writing dictionary file
*/
@CarbonProperty
public static final String DICTIONARY_ONE_CHUNK_SIZE = "carbon.dictionary.chunk.size";
/**
* dictionary chunk default size
*/
public static final String DICTIONARY_ONE_CHUNK_SIZE_DEFAULT = "10000";
/**
* Dictionary Server Worker Threads
*/
@CarbonProperty
public static final String DICTIONARY_WORKER_THREADS = "dictionary.worker.threads";
/**
* Dictionary Server Worker Threads
*/
public static final String DICTIONARY_WORKER_THREADS_DEFAULT = "1";
/**
* Size of Major Compaction in MBs
*/
@CarbonProperty(dynamicConfigurable = true)
public static final String CARBON_MAJOR_COMPACTION_SIZE = "carbon.major.compaction.size";
/**
* By default size of major compaction in MBs.
*/
public static final String DEFAULT_CARBON_MAJOR_COMPACTION_SIZE = "1024";
/**
* This property is used to tell how many segments to be preserved from merging.
*/
@CarbonProperty
public static final java.lang.String PRESERVE_LATEST_SEGMENTS_NUMBER =
"carbon.numberof.preserve.segments";
/**
* If preserve property is enabled then 2 segments will be preserved.
*/
public static final String DEFAULT_PRESERVE_LATEST_SEGMENTS_NUMBER = "0";
/**
* This property will determine the loads of how many days can be compacted.
*/
@CarbonProperty
public static final java.lang.String DAYS_ALLOWED_TO_COMPACT = "carbon.allowed.compaction.days";
/**
* Default value of 1 day loads can be compacted
*/
public static final String DEFAULT_DAYS_ALLOWED_TO_COMPACT = "0";
/**
* space reserved for writing block meta data in carbon data file
*/
@CarbonProperty
public static final String CARBON_BLOCK_META_RESERVED_SPACE =
"carbon.block.meta.size.reserved.percentage";
/**
* default value for space reserved for writing block meta data in carbon data file
*/
public static final String CARBON_BLOCK_META_RESERVED_SPACE_DEFAULT = "10";
/**
* this variable is to enable/disable prefetch of data during merge sort while
* reading data from sort temp files
*/
@CarbonProperty
public static final String CARBON_MERGE_SORT_PREFETCH = "carbon.merge.sort.prefetch";
public static final String CARBON_MERGE_SORT_PREFETCH_DEFAULT = "true";
/**
* If we are executing insert into query from source table using select statement
* & loading the same source table concurrently, when select happens on source table
* during the data load , it gets new record for which dictionary is not generated,
* So there will be inconsistency. To avoid this condition we can persist the dataframe
* into MEMORY_AND_DISK and perform insert into operation. By default this value
* will be false because no need to persist the dataframe in all cases. If user want
* to run load and insert queries on source table concurrently then user can enable this flag
*/
@InterfaceStability.Evolving
@CarbonProperty
public static final String CARBON_INSERT_PERSIST_ENABLED = "carbon.insert.persist.enable";
/**
* by default rdd will not be persisted in the insert case.
*/
public static final String CARBON_INSERT_PERSIST_ENABLED_DEFAULT = "false";
/**
* Which storage level to persist dataset when insert into data
* with 'carbon.insert.persist.enable'='true'
*/
@InterfaceStability.Evolving
@CarbonProperty
public static final String CARBON_INSERT_STORAGE_LEVEL =
"carbon.insert.storage.level";
/**
* The default value(MEMORY_AND_DISK) is the same as the default storage level of Dataset.
* Unlike `RDD.cache()`, the default storage level is set to be `MEMORY_AND_DISK` because
* recomputing the in-memory columnar representation of the underlying table is expensive.
*
* if user's executor has less memory, set the CARBON_INSERT_STORAGE_LEVEL
* to MEMORY_AND_DISK_SER or other storage level to correspond to different environment.
* You can get more recommendations about storage level in spark website:
* http://spark.apache.org/docs/latest/rdd-programming-guide.html#rdd-persistence.
*/
public static final String CARBON_INSERT_STORAGE_LEVEL_DEFAULT = "MEMORY_AND_DISK";
/**
* Number of unmerged segments to be merged.
*/
@CarbonProperty(dynamicConfigurable = true)
public static final String COMPACTION_SEGMENT_LEVEL_THRESHOLD =
"carbon.compaction.level.threshold";
/**
* Default count for Number of segments to be merged in levels is 4,3
*/
public static final String DEFAULT_SEGMENT_LEVEL_THRESHOLD = "4,3";
/**
* Number of Update Delta files which is the Threshold for IUD compaction.
* Only accepted Range is 0 - 10000. Outside this range system will pick default value.
*/
@CarbonProperty
public static final String UPDATE_DELTAFILE_COUNT_THRESHOLD_IUD_COMPACTION =
"carbon.horizontal.update.compaction.threshold";
/**
* Default count of segments which act as a threshold for IUD compaction merge.
*/
public static final String DEFAULT_UPDATE_DELTAFILE_COUNT_THRESHOLD_IUD_COMPACTION = "1";
/**
* Number of Delete Delta files which is the Threshold for IUD compaction.
* Only accepted Range is 0 - 10000. Outside this range system will pick default value.
*/
@CarbonProperty
public static final String DELETE_DELTAFILE_COUNT_THRESHOLD_IUD_COMPACTION =
"carbon.horizontal.delete.compaction.threshold";
/**
* Default count of segments which act as a threshold for IUD compaction merge.
*/
public static final String DEFAULT_DELETE_DELTAFILE_COUNT_THRESHOLD_IUD_COMPACTION = "1";
/**
* @Deprecated : This property has been deprecated.
* Property for enabling system level compaction lock.1 compaction can run at once.
*/
@CarbonProperty
public static final String ENABLE_CONCURRENT_COMPACTION = "carbon.concurrent.compaction";
/**
* Default value of Property for enabling system level compaction lock.1 compaction can run
* at once.
*/
public static final String DEFAULT_ENABLE_CONCURRENT_COMPACTION = "true";
/**
* This batch size is used to send rows from load step to another step in batches.
*/
@CarbonProperty
public static final String DATA_LOAD_BATCH_SIZE = "DATA_LOAD_BATCH_SIZE";
/**
* Default size of data load batch size.
*/
public static final String DATA_LOAD_BATCH_SIZE_DEFAULT = "1000";
/**
* to determine to use the rdd persist or not.
*/
@InterfaceStability.Evolving
@CarbonProperty
public static final String CARBON_UPDATE_PERSIST_ENABLE = "carbon.update.persist.enable";
/**
* by default rdd will be persisted in the update case.
*/
public static final String CARBON_UPDATE_PERSIST_ENABLE_DEFAULT = "true";
/**
* for enabling or disabling Horizontal Compaction.
*/
@CarbonProperty
public static final String CARBON_HORIZONTAL_COMPACTION_ENABLE =
"carbon.horizontal.compaction.enable";
/**
* Default value for HorizontalCompaction is true.
*/
public static final String CARBON_HORIZONTAL_COMPACTION_ENABLE_DEFAULT = "true";
/**
* Which storage level to persist dataset when updating data
* with 'carbon.update.persist.enable'='true'
*/
@InterfaceStability.Evolving
@CarbonProperty
public static final String CARBON_UPDATE_STORAGE_LEVEL =
"carbon.update.storage.level";
/**
* The default value(MEMORY_AND_DISK) is the same as the default storage level of Dataset.
* Unlike `RDD.cache()`, the default storage level is set to be `MEMORY_AND_DISK` because
* recomputing the in-memory columnar representation of the underlying table is expensive.
*
* if user's executor has less memory, set the CARBON_UPDATE_STORAGE_LEVEL
* to MEMORY_AND_DISK_SER or other storage level to correspond to different environment.
* You can get more recommendations about storage level in spark website:
* http://spark.apache.org/docs/latest/rdd-programming-guide.html#rdd-persistence.
*/
public static final String CARBON_UPDATE_STORAGE_LEVEL_DEFAULT = "MEMORY_AND_DISK";
/**
* to enable unsafe column page
*/
@CarbonProperty
public static final String ENABLE_UNSAFE_COLUMN_PAGE = "enable.unsafe.columnpage";
/**
* default value of ENABLE_UNSAFE_COLUMN_PAGE
*/
public static final String ENABLE_UNSAFE_COLUMN_PAGE_DEFAULT = "true";
/**
* to enable offheap sort
*/
@CarbonProperty(dynamicConfigurable = true)
public static final String ENABLE_UNSAFE_SORT = "enable.unsafe.sort";
/**
* to enable offheap sort
*/
public static final String ENABLE_UNSAFE_SORT_DEFAULT = "true";
/**
* to enable offheap sort
*/
@CarbonProperty(dynamicConfigurable = true)
public static final String ENABLE_OFFHEAP_SORT = "enable.offheap.sort";
/**
* to enable offheap sort
*/
public static final String ENABLE_OFFHEAP_SORT_DEFAULT = "true";
@CarbonProperty
public static final String ENABLE_INMEMORY_MERGE_SORT = "enable.inmemory.merge.sort";
public static final String ENABLE_INMEMORY_MERGE_SORT_DEFAULT = "false";
@CarbonProperty
public static final String OFFHEAP_SORT_CHUNK_SIZE_IN_MB = "offheap.sort.chunk.size.inmb";
public static final String OFFHEAP_SORT_CHUNK_SIZE_IN_MB_DEFAULT = "64";
@CarbonProperty
public static final String UNSAFE_WORKING_MEMORY_IN_MB = "carbon.unsafe.working.memory.in.mb";
public static final String UNSAFE_WORKING_MEMORY_IN_MB_DEFAULT = "512";
@CarbonProperty
public static final String UNSAFE_DRIVER_WORKING_MEMORY_IN_MB =
"carbon.unsafe.driver.working.memory.in.mb";
/**
* Sorts the data in batches and writes the batch data to store with index file.
*/
@CarbonProperty
public static final String LOAD_SORT_SCOPE = "carbon.load.sort.scope";
/**
* If set to BATCH_SORT, the sorting scope is smaller and more index tree will be created,
* thus loading is faster but query maybe slower.
* If set to LOCAL_SORT, the sorting scope is bigger and one index tree per data node will be
* created, thus loading is slower but query is faster.
* If set to GLOBAL_SORT, the sorting scope is bigger and one index tree per task will be
* created, thus loading is slower but query is faster.
*/
public static final String LOAD_SORT_SCOPE_DEFAULT = "NO_SORT";
/**
* Size of batch data to keep in memory, as a thumb rule it supposed
* to be less than 45% of sort.inmemory.size.inmb otherwise it may spill intermediate data to disk
*/
@CarbonProperty
public static final String LOAD_BATCH_SORT_SIZE_INMB = "carbon.load.batch.sort.size.inmb";
public static final String LOAD_BATCH_SORT_SIZE_INMB_DEFAULT = "0";
/**
* The Number of partitions to use when shuffling data for sort. If user don't configurate or
* configurate it less than 1, it uses the number of map tasks as reduce tasks. In general, we
* recommend 2-3 tasks per CPU core in your cluster.
*/
@CarbonProperty
public static final String LOAD_GLOBAL_SORT_PARTITIONS = "carbon.load.global.sort.partitions";
public static final String LOAD_GLOBAL_SORT_PARTITIONS_DEFAULT = "0";
/*
* carbon dictionary server port
*/
@CarbonProperty
public static final String DICTIONARY_SERVER_PORT = "carbon.dictionary.server.port";
/**
* Default carbon dictionary server port
*/
public static final String DICTIONARY_SERVER_PORT_DEFAULT = "2030";