CREATE TABLE IF NOT EXISTS bulk_table
(
  file_id VARCHAR NOT NULL,
  recnum INTEGER NOT NULL,
  m.dtm VARCHAR,
  m.proto INTEGER,
  m.saddr BIGINT,
  m.soct1 INTEGER,
  m.soct2 INTEGER,
  m.soct3 INTEGER,
  m.soct4 INTEGER,
  m.daddr BIGINT,
  m.doct1 INTEGER,
  m.doct2 INTEGER,
  m.doct3 INTEGER,
  m.doct4 INTEGER,
  m.sport INTEGER,
  m.dport INTEGER,
  m.fragment_type CHAR(1),
  m.duration FLOAT,
  m.src_payload BIGINT,
  m.dst_payload BIGINT,
  m.src_bytes BIGINT,
  m.dst_bytes BIGINT,
  m.src_packets INTEGER,
  m.dst_packets INTEGER,
  m.src_ip_opts INTEGER,
  m.dst_ip_opts INTEGER,
  m.src_tcp_opts INTEGER,
  m.dst_tcp_opts INTEGER,
  m.rec_forced INTEGER,
  m.src_wire_bytes BIGINT,
  m.dst_wire_bytes BIGINT,
  m.src_captured_bytes BIGINT,
  m.dst_captured_bytes BIGINT,
  m.src_tcp_flg VARCHAR,
  m.dst_tcp_flg VARCHAR,
  m.tcp_early_late_flg VARCHAR,
  m.src_first_tcp_seq BIGINT,
  m.dst_first_tcp_seq BIGINT,
  m.src_last_tcp_seq BIGINT,
  m.dst_last_tcp_seq BIGINT,
  m.category VARCHAR
 CONSTRAINT pkey PRIMARY KEY (file_id,recnum)
) IMMUTABLE_ROWS=true,COMPRESSION='SNAPPY',SALT_BUCKETS=40,SPLIT_POLICY='org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy';

CREATE INDEX IF NOT EXISTS bulk_table_saddr_idx  ON bulk_table(m.saddr) COMPRESSION='SNAPPY',MAX_FILESIZE='1000000000',SPLIT_POLICY='org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy';
CREATE INDEX IF NOT EXISTS bulk_table_daddr_idx  ON bulk_table(m.daddr) COMPRESSION='SNAPPY',MAX_FILESIZE='1000000000',SPLIT_POLICY='org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy';
