示例#1
0
 def __init__(self):
     # Python 2.x
     super(HBaseGenerateData, self).__init__()
     # Python 3.x
     # super().__init__()
     self.conn = None
     self.host = None
     self.port = 9090
     self.verbose_default = 2
     self.default_table_name = 'HS_test_data'
     self.default_num_rows = 10000
     self.default_key_length = 20
     self.default_value_length = 40
     self.default_skew_pc = 90
     self.table = self.default_table_name
     self.num_rows = self.default_num_rows
     self.key_length = self.default_key_length
     self.value_length = self.default_value_length
     self.skew = False
     self.skew_pc = self.default_skew_pc
     self.drop_table = False
     self.use_existing_table = False
     self.column_family = 'cf1'
     self.timeout_default = 6 * 3600
     autoflush()
 def __init__(self):
     # Python 2.x
     super(HBaseCalculateTableRegionRowDistribution, self).__init__()
     # Python 3.x
     # super().__init__()
     self.conn = None
     self.host = None
     self.port = 9090
     self.table = None
     self.timeout_default = 6 * 3600
     self.re_hex = re.compile('([a-f]+)') # to convert to uppercase later for aesthetics
     self.total_rows = 0
     self.rows = {}
     self.sort = False
     self.sort_desc = False
     self.prefix_length = 1
     self.key_prefix_header = 'Key Prefix'
     self.key_prefix_width = len(self.key_prefix_header)
     self.row_count_header = 'Row Count'
     self.row_count_width = len(self.row_count_header)
     self.row_count_pc_header = '% of Total Rows'
     self.row_count_pc_width = len(self.row_count_pc_header)
     self.separator = '    '
     self.total_width = (self.key_prefix_width +
                         self.row_count_width +
                         self.row_count_pc_width +
                         len(self.separator) * 2)
     autoflush()
 def __init__(self):
     # Python 2.x
     super(OpenTSDBCalculateImportDistribution, self).__init__()
     # Python 3.x
     # super().__init__()
     self.timeout_default = 3600
     self.files = []
     self.keys = {}
     self.total_keys = 0
     self.re_line = re.compile(r'^\s*(\S+)\s+(\d+)\s+(-?\d+(?:\.\d+)?)\s+(\S+=\S+(?:\s+\S+=\S+)*)\s*$')
     self.include_timestamps = False
     self.skip_errors = False
     self.sort_desc = False
     self.prefix_length = None
     self.metric_prefix_header = 'Key Prefix'
     self.metric_prefix_width = len(self.metric_prefix_header)
     self.count_header = 'Count'
     self.count_width = len(self.count_header)
     self.count_pc_header = '% of Total'
     self.count_pc_width = len(self.count_pc_header)
     self.separator = '    '
     self.total_width = (self.metric_prefix_width +
                         self.count_width +
                         self.count_pc_width +
                         len(self.separator) * 2)
     autoflush()
示例#4
0
 def __init__(self):
     # Python 2.x
     super(HBaseFlushTables, self).__init__()
     # Python 3.x
     # super().__init__()
     self.table_list_header_regex = re.compile('TABLE')
     self.table_list_end_regex = re.compile(r'row.*\sin\s.*\sseconds')
     self.table_regex = None
     self.timeout_default = 6 * 3600
     autoflush()