├── .idea ├── compiler.xml ├── encodings.xml ├── inspectionProfiles │ └── Project_Default.xml ├── libraries │ ├── Maven__asm_asm_3_1.xml │ ├── Maven__com_amazonaws_aws_java_sdk_core_1_10_6.xml │ ├── Maven__com_amazonaws_aws_java_sdk_kms_1_10_6.xml │ ├── Maven__com_amazonaws_aws_java_sdk_s3_1_10_6.xml │ ├── Maven__com_amazonaws_aws_java_sdk_sts_1_10_6.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_5_0.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_5_3.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_5_3.xml │ ├── Maven__com_github_stephenc_findbugs_findbugs_annotations_1_3_9_1.xml │ ├── Maven__com_github_stephenc_high_scale_lib_high_scale_lib_1_1_1.xml │ ├── Maven__com_google_code_findbugs_jsr305_3_0_0.xml │ ├── Maven__com_google_code_gson_gson_2_2_4.xml │ ├── Maven__com_google_guava_guava_12_0_1.xml │ ├── Maven__com_google_protobuf_protobuf_java_2_5_0.xml │ ├── Maven__com_lmax_disruptor_3_3_0.xml │ ├── Maven__com_sun_jersey_jersey_client_1_9.xml │ ├── Maven__com_sun_jersey_jersey_core_1_9.xml │ ├── Maven__com_sun_jersey_jersey_server_1_9.xml │ ├── Maven__com_thoughtworks_paranamer_paranamer_2_3.xml │ ├── Maven__com_yammer_metrics_metrics_core_2_2_0.xml │ ├── Maven__commons_beanutils_commons_beanutils_1_7_0.xml │ ├── Maven__commons_beanutils_commons_beanutils_core_1_8_0.xml │ ├── Maven__commons_cli_commons_cli_1_2.xml │ ├── Maven__commons_codec_commons_codec_1_9.xml │ ├── Maven__commons_collections_commons_collections_3_2_2.xml │ ├── Maven__commons_configuration_commons_configuration_1_6.xml │ ├── Maven__commons_daemon_commons_daemon_1_0_13.xml │ ├── Maven__commons_digester_commons_digester_1_8.xml │ ├── Maven__commons_el_commons_el_1_0.xml │ ├── Maven__commons_httpclient_commons_httpclient_3_1.xml │ ├── Maven__commons_io_commons_io_2_4.xml │ ├── Maven__commons_lang_commons_lang_2_6.xml │ ├── Maven__commons_logging_commons_logging_1_2.xml │ ├── Maven__commons_net_commons_net_3_1.xml │ ├── Maven__hsqldb_hsqldb_1_8_0_10.xml │ ├── Maven__io_netty_netty_3_10_5_Final.xml │ ├── Maven__io_netty_netty_all_4_0_23_Final.xml │ ├── Maven__javax_activation_activation_1_1.xml │ ├── Maven__javax_servlet_jsp_jsp_api_2_1.xml │ ├── Maven__javax_servlet_servlet_api_2_5.xml │ ├── Maven__javax_xml_bind_jaxb_api_2_2_2.xml │ ├── Maven__javax_xml_stream_stax_api_1_0_2.xml │ ├── Maven__jline_jline_2_11.xml │ ├── Maven__junit_junit_4_12.xml │ ├── Maven__log4j_log4j_1_2_17.xml │ ├── Maven__net_java_dev_jets3t_jets3t_0_6_1.xml │ ├── Maven__org_apache_avro_avro_1_7_6_cdh5_10_0.xml │ ├── Maven__org_apache_commons_commons_compress_1_4_1.xml │ ├── Maven__org_apache_commons_commons_math3_3_1_1.xml │ ├── Maven__org_apache_commons_commons_math_2_1.xml │ ├── Maven__org_apache_curator_curator_client_2_7_1.xml │ ├── Maven__org_apache_curator_curator_framework_2_7_1.xml │ ├── Maven__org_apache_curator_curator_recipes_2_7_1.xml │ ├── Maven__org_apache_directory_api_api_asn1_api_1_0_0_M20.xml │ ├── Maven__org_apache_directory_api_api_util_1_0_0_M20.xml │ ├── Maven__org_apache_directory_server_apacheds_i18n_2_0_0_M15.xml │ ├── Maven__org_apache_directory_server_apacheds_kerberos_codec_2_0_0_M15.xml │ ├── Maven__org_apache_hadoop_hadoop_annotations_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_auth_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_aws_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_client_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_common_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_core_2_6_0_mr1_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_hdfs_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_hdfs_test_jar_tests_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_mapreduce_client_app_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_mapreduce_client_common_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_mapreduce_client_core_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_mapreduce_client_jobclient_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_mapreduce_client_shuffle_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_yarn_api_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_yarn_client_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_yarn_common_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hadoop_hadoop_yarn_server_common_2_6_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_annotations_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_client_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_common_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_common_tests_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_hadoop2_compat_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_hadoop_compat_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_prefix_tree_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_procedure_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_protocol_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_hbase_hbase_server_1_2_0_cdh5_10_0.xml │ ├── Maven__org_apache_htrace_htrace_core4_4_0_1_incubating.xml │ ├── Maven__org_apache_htrace_htrace_core_3_2_0_incubating.xml │ ├── Maven__org_apache_httpcomponents_httpclient_4_2_5.xml │ ├── Maven__org_apache_httpcomponents_httpcore_4_2_4.xml │ ├── Maven__org_apache_zookeeper_zookeeper_3_4_5_cdh5_10_0.xml │ ├── Maven__org_codehaus_jackson_jackson_core_asl_1_8_8.xml │ ├── Maven__org_codehaus_jackson_jackson_jaxrs_1_8_8.xml │ ├── Maven__org_codehaus_jackson_jackson_mapper_asl_1_8_8.xml │ ├── Maven__org_codehaus_jackson_jackson_xc_1_8_8.xml │ ├── Maven__org_eclipse_jdt_core_3_1_1.xml │ ├── Maven__org_fusesource_leveldbjni_leveldbjni_all_1_8.xml │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ ├── Maven__org_jamon_jamon_runtime_2_4_1.xml │ ├── Maven__org_jboss_netty_netty_3_2_2_Final.xml │ ├── Maven__org_jruby_jcodings_jcodings_1_0_8.xml │ ├── Maven__org_jruby_joni_joni_2_1_2.xml │ ├── Maven__org_mortbay_jetty_jetty_6_1_26_cloudera_4.xml │ ├── Maven__org_mortbay_jetty_jetty_sslengine_6_1_26_cloudera_4.xml │ ├── Maven__org_mortbay_jetty_jetty_util_6_1_26_cloudera_4.xml │ ├── Maven__org_mortbay_jetty_jsp_2_1_6_1_14.xml │ ├── Maven__org_mortbay_jetty_jsp_api_2_1_6_1_14.xml │ ├── Maven__org_mortbay_jetty_servlet_api_2_5_6_1_14.xml │ ├── Maven__org_scala_lang_scala_library_2_10_5.xml │ ├── Maven__org_slf4j_slf4j_api_1_7_5.xml │ ├── Maven__org_slf4j_slf4j_log4j12_1_7_5.xml │ ├── Maven__org_tukaani_xz_1_0.xml │ ├── Maven__org_xerial_snappy_snappy_java_1_0_4_1.xml │ ├── Maven__tomcat_jasper_compiler_5_5_23.xml │ ├── Maven__tomcat_jasper_runtime_5_5_23.xml │ ├── Maven__xerces_xercesImpl_2_9_1.xml │ ├── Maven__xml_apis_xml_apis_1_3_04.xml │ └── Maven__xmlenc_xmlenc_0_52.xml ├── misc.xml ├── modules.xml └── workspace.xml ├── hbaseexport.iml ├── pom.xml ├── src └── main │ └── java │ └── org │ └── hadoop │ └── hbase │ └── dataExport │ └── ExportSnapshot.java └── target ├── balancer.jar ├── classes └── org │ └── hadoop │ └── hbase │ └── dataExport │ ├── ExportSnapshot$1.class │ ├── ExportSnapshot$2.class │ ├── ExportSnapshot$3.class │ ├── ExportSnapshot$Counter.class │ ├── ExportSnapshot$ExportMapper.class │ ├── ExportSnapshot$ExportSnapshotInputFormat$ExportSnapshotInputSplit.class │ ├── ExportSnapshot$ExportSnapshotInputFormat$ExportSnapshotRecordReader.class │ ├── ExportSnapshot$ExportSnapshotInputFormat.class │ └── ExportSnapshot.class ├── hbase-export-1.0-SNAPSHOT.jar ├── maven-archiver └── pom.properties └── maven-status └── maven-compiler-plugin ├── compile └── default-compile │ ├── createdFiles.lst │ └── inputFiles.lst └── testCompile └── default-testCompile └── inputFiles.lst /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__asm_asm_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_amazonaws_aws_java_sdk_core_1_10_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_amazonaws_aws_java_sdk_kms_1_10_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_amazonaws_aws_java_sdk_s3_1_10_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_amazonaws_aws_java_sdk_sts_1_10_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_5_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_5_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_github_stephenc_findbugs_findbugs_annotations_1_3_9_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_github_stephenc_high_scale_lib_high_scale_lib_1_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_findbugs_jsr305_3_0_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_gson_gson_2_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_guava_guava_12_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_protobuf_protobuf_java_2_5_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_lmax_disruptor_3_3_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_jersey_jersey_client_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_jersey_jersey_core_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_sun_jersey_jersey_server_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_thoughtworks_paranamer_paranamer_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_yammer_metrics_metrics_core_2_2_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_beanutils_commons_beanutils_core_1_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_cli_commons_cli_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_codec_commons_codec_1_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_collections_commons_collections_3_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_configuration_commons_configuration_1_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_daemon_commons_daemon_1_0_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_digester_commons_digester_1_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_el_commons_el_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_httpclient_commons_httpclient_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_io_commons_io_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_net_commons_net_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__hsqldb_hsqldb_1_8_0_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_3_10_5_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_netty_netty_all_4_0_23_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_activation_activation_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_servlet_jsp_jsp_api_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_servlet_servlet_api_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_xml_bind_jaxb_api_2_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_xml_stream_stax_api_1_0_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jline_jline_2_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__junit_junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__log4j_log4j_1_2_17.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_java_dev_jets3t_jets3t_0_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_avro_avro_1_7_6_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_compress_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_math3_3_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_math_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_curator_curator_client_2_7_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_curator_curator_framework_2_7_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_curator_curator_recipes_2_7_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_directory_api_api_asn1_api_1_0_0_M20.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_directory_api_api_util_1_0_0_M20.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_directory_server_apacheds_i18n_2_0_0_M15.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_directory_server_apacheds_kerberos_codec_2_0_0_M15.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_annotations_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_auth_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_aws_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_client_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_common_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_core_2_6_0_mr1_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_hdfs_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_hdfs_test_jar_tests_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_mapreduce_client_app_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_mapreduce_client_common_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_mapreduce_client_core_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_mapreduce_client_jobclient_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_mapreduce_client_shuffle_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_yarn_api_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_yarn_client_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_yarn_common_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hadoop_hadoop_yarn_server_common_2_6_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_annotations_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_client_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_common_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_common_tests_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_hadoop2_compat_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_hadoop_compat_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_prefix_tree_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_procedure_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_protocol_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_hbase_hbase_server_1_2_0_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_htrace_htrace_core4_4_0_1_incubating.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_htrace_htrace_core_3_2_0_incubating.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_zookeeper_zookeeper_3_4_5_cdh5_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_8_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_jackson_jackson_jaxrs_1_8_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_asl_1_8_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_jackson_jackson_xc_1_8_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_eclipse_jdt_core_3_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_fusesource_leveldbjni_leveldbjni_all_1_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jamon_jamon_runtime_2_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jboss_netty_netty_3_2_2_Final.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jruby_jcodings_jcodings_1_0_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jruby_joni_joni_2_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_jetty_6_1_26_cloudera_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_jetty_sslengine_6_1_26_cloudera_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_jetty_util_6_1_26_cloudera_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_jsp_2_1_6_1_14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_jsp_api_2_1_6_1_14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mortbay_jetty_servlet_api_2_5_6_1_14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_scala_lang_scala_library_2_10_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_log4j12_1_7_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_tukaani_xz_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_xerial_snappy_snappy_java_1_0_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__tomcat_jasper_compiler_5_5_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__tomcat_jasper_runtime_5_5_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xerces_xercesImpl_2_9_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xml_apis_xml_apis_1_3_04.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xmlenc_xmlenc_0_52.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Android > Lint > Correctness 19 | 20 | 21 | Android > Lint > Security 22 | 23 | 24 | General 25 | 26 | 27 | GeneralScala 28 | 29 | 30 | Inheritance issuesJava 31 | 32 | 33 | Internationalization issues 34 | 35 | 36 | Java 37 | 38 | 39 | Java language level migration aidsJava 40 | 41 | 42 | Plugin DevKit 43 | 44 | 45 | Scala 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | $USER_HOME$/.subversion 56 | 57 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /hbaseexport.iml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | org.hadoop.hbase.dataExport 6 | hbase-export 7 | 1.0-SNAPSHOT 8 | jar 9 | 10 | hbase-export 11 | http://maven.apache.org 12 | 13 | 14 | 15 | scala-tools.org 16 | Scala-tools Maven2 Repository 17 | http://scala-tools.org/repo-releases 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 25 | 26 | 27 | src/ 28 | target/classes 29 | target/test-classes 30 | 31 | 32 | org.apache.maven.plugins 33 | maven-surefire-plugin 34 | 2.17 35 | 36 | 37 | org.apache.maven.surefire 38 | surefire-junit47 39 | 2.17 40 | 41 | 42 | 43 | 44 | org.apache.maven.plugins 45 | maven-compiler-plugin 46 | 3.6.1 47 | 48 | 1.7 49 | 1.7 50 | 51 | ** 52 | 53 | 54 | 55 | 56 | org.apache.maven.plugins 57 | maven-shade-plugin 58 | 3.0.0 59 | 60 | false 61 | target/balancer.jar 62 | 63 | 64 | *:* 65 | 70 | 71 | 72 | 73 | 74 | *:* 75 | 76 | META-INF/*.SF 77 | META-INF/*.DSA 78 | META-INF/*.RSA 79 | 80 | 81 | 82 | 83 | 84 | 85 | package 86 | 87 | shade 88 | 89 | 90 | 91 | 93 | 95 | reference.conf 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | org.scala-lang 108 | scala-library 109 | 2.10.5 110 | 111 | 112 | org.apache.zookeeper 113 | zookeeper 114 | 3.4.5-cdh5.10.0 115 | 116 | 117 | org.apache.hadoop 118 | hadoop-client 119 | 2.6.0-cdh5.10.0 120 | 121 | 122 | org.apache.hbase 123 | hbase-client 124 | 1.2.0-cdh5.10.0 125 | 126 | 127 | org.apache.hbase 128 | hbase-server 129 | 1.2.0-cdh5.10.0 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | cdh.repo 138 | Cloudera Repositories 139 | https://repository.cloudera.com/artifactory/cloudera-repos 140 | 141 | false 142 | 143 | 144 | 145 | sonatype 146 | sonatype repository 147 | https://oss.sonatype.org/content/groups/public/ 148 | 149 | true 150 | 151 | 152 | true 153 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /src/main/java/org/hadoop/hbase/dataExport/ExportSnapshot.java: -------------------------------------------------------------------------------- 1 | package org.hadoop.hbase.dataExport; 2 | 3 | /** 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, software 15 | * distributed under the License is distributed on an "AS IS" BASIS, 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 | * See the License for the specific language governing permissions and 18 | * limitations under the License. 19 | */ 20 | 21 | import org.apache.commons.logging.Log; 22 | import org.apache.commons.logging.LogFactory; 23 | import org.apache.hadoop.conf.Configuration; 24 | import org.apache.hadoop.conf.Configured; 25 | import org.apache.hadoop.fs.*; 26 | import org.apache.hadoop.fs.FileSystem; 27 | import org.apache.hadoop.fs.permission.FsPermission; 28 | import org.apache.hadoop.hbase.HBaseConfiguration; 29 | import org.apache.hadoop.hbase.HConstants; 30 | import org.apache.hadoop.hbase.HRegionInfo; 31 | import org.apache.hadoop.hbase.TableName; 32 | import org.apache.hadoop.hbase.classification.InterfaceAudience; 33 | import org.apache.hadoop.hbase.classification.InterfaceStability; 34 | import org.apache.hadoop.hbase.io.FileLink; 35 | import org.apache.hadoop.hbase.io.HFileLink; 36 | import org.apache.hadoop.hbase.io.WALLink; 37 | import org.apache.hadoop.hbase.io.hadoopbackport.ThrottledInputStream; 38 | import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil; 39 | import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription; 40 | import org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotFileInfo; 41 | import org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos.SnapshotRegionManifest; 42 | import org.apache.hadoop.hbase.snapshot.ExportSnapshotException; 43 | import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils; 44 | import org.apache.hadoop.hbase.snapshot.SnapshotReferenceUtil; 45 | import org.apache.hadoop.hbase.util.FSUtils; 46 | import org.apache.hadoop.hbase.util.Pair; 47 | import org.apache.hadoop.io.BytesWritable; 48 | import org.apache.hadoop.io.IOUtils; 49 | import org.apache.hadoop.io.NullWritable; 50 | import org.apache.hadoop.io.Writable; 51 | import org.apache.hadoop.mapreduce.*; 52 | import org.apache.hadoop.mapreduce.lib.output.NullOutputFormat; 53 | import org.apache.hadoop.mapreduce.security.TokenCache; 54 | import org.apache.hadoop.util.StringUtils; 55 | import org.apache.hadoop.util.Tool; 56 | import org.apache.hadoop.util.ToolRunner; 57 | 58 | import java.io.*; 59 | import java.util.*; 60 | 61 | /** 62 | * Export the specified snapshot to a given FileSystem. 63 | * 64 | * The .snapshot/name folder is copied to the destination cluster 65 | * and then all the hfiles/wals are copied using a Map-Reduce Job in the .archive/ location. 66 | * When everything is done, the second cluster can restore the snapshot. 67 | */ 68 | @InterfaceAudience.Public 69 | @InterfaceStability.Evolving 70 | public class ExportSnapshot extends Configured implements Tool { 71 | 72 | public static final String NAME = "exportsnapshot"; 73 | /** Configuration prefix for overrides for the source filesystem */ 74 | public static final String CONF_SOURCE_PREFIX = NAME + ".from."; 75 | /** Configuration prefix for overrides for the destination filesystem */ 76 | public static final String CONF_DEST_PREFIX = NAME + ".to."; 77 | 78 | private static final Log LOG = LogFactory.getLog(ExportSnapshot.class); 79 | 80 | private static final String MR_NUM_MAPS = "mapreduce.job.maps"; 81 | private static final String CONF_NUM_SPLITS = "snapshot.export.format.splits"; 82 | private static final String CONF_SNAPSHOT_NAME = "snapshot.export.format.snapshot.name"; 83 | private static final String CONF_SNAPSHOT_OLD_NAME = "snapshot.export.format.snapshot.old.name"; 84 | private static final String CONF_SNAPSHOT_DIR = "snapshot.export.format.snapshot.dir"; 85 | private static final String CONF_SNAPSHOT_OLD_DIR = "snapshot.export.format.snapshot.old.dir"; 86 | private static final String CONF_FILES_USER = "snapshot.export.files.attributes.user"; 87 | private static final String CONF_FILES_GROUP = "snapshot.export.files.attributes.group"; 88 | private static final String CONF_FILES_MODE = "snapshot.export.files.attributes.mode"; 89 | private static final String CONF_CHECKSUM_VERIFY = "snapshot.export.checksum.verify"; 90 | private static final String CONF_OUTPUT_ROOT = "snapshot.export.output.root"; 91 | private static final String CONF_INPUT_ROOT = "snapshot.export.input.root"; 92 | private static final String CONF_BUFFER_SIZE = "snapshot.export.buffer.size"; 93 | private static final String CONF_MAP_GROUP = "snapshot.export.default.map.group"; 94 | private static final String CONF_BANDWIDTH_MB = "snapshot.export.map.bandwidth.mb"; 95 | protected static final String CONF_SKIP_TMP = "snapshot.export.skip.tmp"; 96 | 97 | static final String CONF_TEST_FAILURE = "test.snapshot.export.failure"; 98 | static final String CONF_TEST_RETRY = "test.snapshot.export.failure.retry"; 99 | 100 | private static final String INPUT_FOLDER_PREFIX = "export-files."; 101 | 102 | // Export Map-Reduce Counters, to keep track of the progress 103 | public enum Counter { 104 | MISSING_FILES, FILES_COPIED, FILES_SKIPPED, COPY_FAILED, 105 | BYTES_EXPECTED, BYTES_SKIPPED, BYTES_COPIED 106 | } 107 | 108 | private static class ExportMapper extends Mapper { 110 | final static int REPORT_SIZE = 1 * 1024 * 1024; 111 | final static int BUFFER_SIZE = 64 * 1024; 112 | 113 | private boolean testFailures; 114 | private Random random; 115 | 116 | private boolean verifyChecksum; 117 | private String filesGroup; 118 | private String filesUser; 119 | private short filesMode; 120 | private int bufferSize; 121 | 122 | private FileSystem outputFs; 123 | private Path outputArchive; 124 | private Path outputRoot; 125 | 126 | private FileSystem inputFs; 127 | private Path inputArchive; 128 | private Path inputRoot; 129 | 130 | @Override 131 | public void setup(Context context) throws IOException { 132 | Configuration conf = context.getConfiguration(); 133 | Configuration srcConf = HBaseConfiguration.createClusterConf(conf, null, CONF_SOURCE_PREFIX); 134 | Configuration destConf = HBaseConfiguration.createClusterConf(conf, null, CONF_DEST_PREFIX); 135 | 136 | verifyChecksum = conf.getBoolean(CONF_CHECKSUM_VERIFY, true); 137 | 138 | filesGroup = conf.get(CONF_FILES_GROUP); 139 | filesUser = conf.get(CONF_FILES_USER); 140 | filesMode = (short)conf.getInt(CONF_FILES_MODE, 0); 141 | outputRoot = new Path(conf.get(CONF_OUTPUT_ROOT)); 142 | inputRoot = new Path(conf.get(CONF_INPUT_ROOT)); 143 | 144 | inputArchive = new Path(inputRoot, HConstants.HFILE_ARCHIVE_DIRECTORY); 145 | outputArchive = new Path(outputRoot, HConstants.HFILE_ARCHIVE_DIRECTORY); 146 | 147 | testFailures = conf.getBoolean(CONF_TEST_FAILURE, false); 148 | 149 | try { 150 | srcConf.setBoolean("fs." + inputRoot.toUri().getScheme() + ".impl.disable.cache", true); 151 | inputFs = FileSystem.get(inputRoot.toUri(), srcConf); 152 | } catch (IOException e) { 153 | throw new IOException("Could not get the input FileSystem with root=" + inputRoot, e); 154 | } 155 | 156 | try { 157 | destConf.setBoolean("fs." + outputRoot.toUri().getScheme() + ".impl.disable.cache", true); 158 | outputFs = FileSystem.get(outputRoot.toUri(), destConf); 159 | } catch (IOException e) { 160 | throw new IOException("Could not get the output FileSystem with root="+ outputRoot, e); 161 | } 162 | 163 | // Use the default block size of the outputFs if bigger 164 | int defaultBlockSize = Math.max((int) outputFs.getDefaultBlockSize(outputRoot), BUFFER_SIZE); 165 | bufferSize = conf.getInt(CONF_BUFFER_SIZE, defaultBlockSize); 166 | LOG.info("Using bufferSize=" + StringUtils.humanReadableInt(bufferSize)); 167 | 168 | for (Counter c : Counter.values()) { 169 | context.getCounter(c).increment(0); 170 | } 171 | } 172 | 173 | @Override 174 | protected void cleanup(Context context) { 175 | IOUtils.closeStream(inputFs); 176 | IOUtils.closeStream(outputFs); 177 | } 178 | 179 | @Override 180 | public void map(BytesWritable key, NullWritable value, Context context) 181 | throws InterruptedException, IOException { 182 | SnapshotFileInfo inputInfo = SnapshotFileInfo.parseFrom(key.copyBytes()); 183 | Path outputPath = getOutputPath(inputInfo); 184 | 185 | copyFile(context, inputInfo, outputPath); 186 | } 187 | 188 | /** 189 | * Returns the location where the inputPath will be copied. 190 | */ 191 | private Path getOutputPath(final SnapshotFileInfo inputInfo) throws IOException { 192 | Path path = null; 193 | switch (inputInfo.getType()) { 194 | case HFILE: 195 | Path inputPath = new Path(inputInfo.getHfile()); 196 | String family = inputPath.getParent().getName(); 197 | TableName table =HFileLink.getReferencedTableName(inputPath.getName()); 198 | String region = HFileLink.getReferencedRegionName(inputPath.getName()); 199 | String hfile = HFileLink.getReferencedHFileName(inputPath.getName()); 200 | path = new Path(FSUtils.getTableDir(new Path("./"), table), 201 | new Path(region, new Path(family, hfile))); 202 | LOG.info("测试日志getOutputPath:" + path.getName()); 203 | break; 204 | case WAL: 205 | Path oldLogsDir = new Path(outputRoot, HConstants.HREGION_OLDLOGDIR_NAME); 206 | path = new Path(oldLogsDir, inputInfo.getWalName()); 207 | break; 208 | default: 209 | throw new IOException("Invalid File Type: " + inputInfo.getType().toString()); 210 | } 211 | return new Path(outputArchive, path); 212 | } 213 | 214 | /* 215 | * Used by TestExportSnapshot to simulate a failure 216 | */ 217 | private void injectTestFailure(final Context context, final SnapshotFileInfo inputInfo) 218 | throws IOException { 219 | if (testFailures) { 220 | if (context.getConfiguration().getBoolean(CONF_TEST_RETRY, false)) { 221 | if (random == null) { 222 | random = new Random(); 223 | } 224 | 225 | // FLAKY-TEST-WARN: lower is better, we can get some runs without the 226 | // retry, but at least we reduce the number of test failures due to 227 | // this test exception from the same map task. 228 | if (random.nextFloat() < 0.03) { 229 | throw new IOException("TEST RETRY FAILURE: Unable to copy input=" + inputInfo 230 | + " time=" + System.currentTimeMillis()); 231 | } 232 | } else { 233 | context.getCounter(Counter.COPY_FAILED).increment(1); 234 | throw new IOException("TEST FAILURE: Unable to copy input=" + inputInfo); 235 | } 236 | } 237 | } 238 | 239 | private void copyFile(final Context context, final SnapshotFileInfo inputInfo, 240 | final Path outputPath) throws IOException { 241 | injectTestFailure(context, inputInfo); 242 | 243 | // Get the file information 244 | FileStatus inputStat = getSourceFileStatus(context, inputInfo); 245 | 246 | // Verify if the output file exists and is the same that we want to copy 247 | if (outputFs.exists(outputPath)) { 248 | FileStatus outputStat = outputFs.getFileStatus(outputPath); 249 | if (outputStat != null && sameFile(inputStat, outputStat)) { 250 | LOG.info("Skip copy " + inputStat.getPath() + " to " + outputPath + ", same file."); 251 | context.getCounter(Counter.FILES_SKIPPED).increment(1); 252 | context.getCounter(Counter.BYTES_SKIPPED).increment(inputStat.getLen()); 253 | return; 254 | } 255 | } 256 | 257 | InputStream in = openSourceFile(context, inputInfo); 258 | int bandwidthMB = context.getConfiguration().getInt(CONF_BANDWIDTH_MB, 100); 259 | if (Integer.MAX_VALUE != bandwidthMB) { 260 | in = new ThrottledInputStream(new BufferedInputStream(in), bandwidthMB * 1024L * 1024L); 261 | } 262 | 263 | try { 264 | context.getCounter(Counter.BYTES_EXPECTED).increment(inputStat.getLen()); 265 | 266 | // Ensure that the output folder is there and copy the file 267 | createOutputPath(outputPath.getParent()); 268 | FSDataOutputStream out = outputFs.create(outputPath, true); 269 | try { 270 | copyData(context, inputStat.getPath(), in, outputPath, out, inputStat.getLen()); 271 | } finally { 272 | out.close(); 273 | } 274 | 275 | // Try to Preserve attributes 276 | if (!preserveAttributes(outputPath, inputStat)) { 277 | LOG.warn("You may have to run manually chown on: " + outputPath); 278 | } 279 | } finally { 280 | in.close(); 281 | } 282 | } 283 | 284 | /** 285 | * Create the output folder and optionally set ownership. 286 | */ 287 | private void createOutputPath(final Path path) throws IOException { 288 | if (filesUser == null && filesGroup == null) { 289 | outputFs.mkdirs(path); 290 | } else { 291 | Path parent = path.getParent(); 292 | if (!outputFs.exists(parent) && !parent.isRoot()) { 293 | createOutputPath(parent); 294 | } 295 | outputFs.mkdirs(path); 296 | if (filesUser != null || filesGroup != null) { 297 | // override the owner when non-null user/group is specified 298 | outputFs.setOwner(path, filesUser, filesGroup); 299 | } 300 | if (filesMode > 0) { 301 | outputFs.setPermission(path, new FsPermission(filesMode)); 302 | } 303 | } 304 | } 305 | 306 | /** 307 | * Try to Preserve the files attribute selected by the user copying them from the source file 308 | * This is only required when you are exporting as a different user than "hbase" or on a system 309 | * that doesn't have the "hbase" user. 310 | * 311 | * This is not considered a blocking failure since the user can force a chmod with the user 312 | * that knows is available on the system. 313 | */ 314 | private boolean preserveAttributes(final Path path, final FileStatus refStat) { 315 | FileStatus stat; 316 | try { 317 | stat = outputFs.getFileStatus(path); 318 | } catch (IOException e) { 319 | LOG.warn("Unable to get the status for file=" + path); 320 | return false; 321 | } 322 | 323 | try { 324 | if (filesMode > 0 && stat.getPermission().toShort() != filesMode) { 325 | outputFs.setPermission(path, new FsPermission(filesMode)); 326 | } else if (refStat != null && !stat.getPermission().equals(refStat.getPermission())) { 327 | outputFs.setPermission(path, refStat.getPermission()); 328 | } 329 | } catch (IOException e) { 330 | LOG.warn("Unable to set the permission for file="+ stat.getPath() +": "+ e.getMessage()); 331 | return false; 332 | } 333 | 334 | boolean hasRefStat = (refStat != null); 335 | String user = stringIsNotEmpty(filesUser) || !hasRefStat ? filesUser : refStat.getOwner(); 336 | String group = stringIsNotEmpty(filesGroup) || !hasRefStat ? filesGroup : refStat.getGroup(); 337 | if (stringIsNotEmpty(user) || stringIsNotEmpty(group)) { 338 | try { 339 | if (!(user.equals(stat.getOwner()) && group.equals(stat.getGroup()))) { 340 | outputFs.setOwner(path, user, group); 341 | } 342 | } catch (IOException e) { 343 | LOG.warn("Unable to set the owner/group for file="+ stat.getPath() +": "+ e.getMessage()); 344 | LOG.warn("The user/group may not exist on the destination cluster: user=" + 345 | user + " group=" + group); 346 | return false; 347 | } 348 | } 349 | 350 | return true; 351 | } 352 | 353 | private boolean stringIsNotEmpty(final String str) { 354 | return str != null && str.length() > 0; 355 | } 356 | 357 | private void copyData(final Context context, 358 | final Path inputPath, final InputStream in, 359 | final Path outputPath, final FSDataOutputStream out, 360 | final long inputFileSize) 361 | throws IOException { 362 | final String statusMessage = "copied %s/" + StringUtils.humanReadableInt(inputFileSize) + 363 | " (%.1f%%)"; 364 | 365 | try { 366 | byte[] buffer = new byte[bufferSize]; 367 | long totalBytesWritten = 0; 368 | int reportBytes = 0; 369 | int bytesRead; 370 | 371 | long stime = System.currentTimeMillis(); 372 | while ((bytesRead = in.read(buffer)) > 0) { 373 | out.write(buffer, 0, bytesRead); 374 | totalBytesWritten += bytesRead; 375 | reportBytes += bytesRead; 376 | 377 | if (reportBytes >= REPORT_SIZE) { 378 | context.getCounter(Counter.BYTES_COPIED).increment(reportBytes); 379 | context.setStatus(String.format(statusMessage, 380 | StringUtils.humanReadableInt(totalBytesWritten), 381 | (totalBytesWritten/(float)inputFileSize) * 100.0f) + 382 | " from " + inputPath + " to " + outputPath); 383 | reportBytes = 0; 384 | } 385 | } 386 | long etime = System.currentTimeMillis(); 387 | 388 | context.getCounter(Counter.BYTES_COPIED).increment(reportBytes); 389 | context.setStatus(String.format(statusMessage, 390 | StringUtils.humanReadableInt(totalBytesWritten), 391 | (totalBytesWritten/(float)inputFileSize) * 100.0f) + 392 | " from " + inputPath + " to " + outputPath); 393 | 394 | // Verify that the written size match 395 | if (totalBytesWritten != inputFileSize) { 396 | String msg = "number of bytes copied not matching copied=" + totalBytesWritten + 397 | " expected=" + inputFileSize + " for file=" + inputPath; 398 | throw new IOException(msg); 399 | } 400 | 401 | LOG.info("copy completed for input=" + inputPath + " output=" + outputPath); 402 | LOG.info("size=" + totalBytesWritten + 403 | " (" + StringUtils.humanReadableInt(totalBytesWritten) + ")" + 404 | " time=" + StringUtils.formatTimeDiff(etime, stime) + 405 | String.format(" %.3fM/sec", (totalBytesWritten / ((etime - stime)/1000.0))/1048576.0)); 406 | context.getCounter(Counter.FILES_COPIED).increment(1); 407 | } catch (IOException e) { 408 | LOG.error("Error copying " + inputPath + " to " + outputPath, e); 409 | context.getCounter(Counter.COPY_FAILED).increment(1); 410 | throw e; 411 | } 412 | } 413 | 414 | /** 415 | * Try to open the "source" file. 416 | * Throws an IOException if the communication with the inputFs fail or 417 | * if the file is not found. 418 | */ 419 | private FSDataInputStream openSourceFile(Context context, final SnapshotFileInfo fileInfo) 420 | throws IOException { 421 | try { 422 | Configuration conf = context.getConfiguration(); 423 | FileLink link = null; 424 | switch (fileInfo.getType()) { 425 | case HFILE: 426 | Path inputPath = new Path(fileInfo.getHfile()); 427 | link = HFileLink.buildFromHFileLinkPattern(conf, inputPath); 428 | break; 429 | case WAL: 430 | String serverName = fileInfo.getWalServer(); 431 | String logName = fileInfo.getWalName(); 432 | link = new WALLink(inputRoot, serverName, logName); 433 | break; 434 | default: 435 | throw new IOException("Invalid File Type: " + fileInfo.getType().toString()); 436 | } 437 | return link.open(inputFs); 438 | } catch (IOException e) { 439 | context.getCounter(Counter.MISSING_FILES).increment(1); 440 | LOG.error("Unable to open source file=" + fileInfo.toString(), e); 441 | throw e; 442 | } 443 | } 444 | 445 | private FileStatus getSourceFileStatus(Context context, final SnapshotFileInfo fileInfo) 446 | throws IOException { 447 | try { 448 | Configuration conf = context.getConfiguration(); 449 | FileLink link = null; 450 | switch (fileInfo.getType()) { 451 | case HFILE: 452 | Path inputPath = new Path(fileInfo.getHfile()); 453 | link = HFileLink.buildFromHFileLinkPattern(conf, inputPath); 454 | break; 455 | case WAL: 456 | link = new WALLink(inputRoot, fileInfo.getWalServer(), fileInfo.getWalName()); 457 | break; 458 | default: 459 | throw new IOException("Invalid File Type: " + fileInfo.getType().toString()); 460 | } 461 | return link.getFileStatus(inputFs); 462 | } catch (FileNotFoundException e) { 463 | context.getCounter(Counter.MISSING_FILES).increment(1); 464 | LOG.error("Unable to get the status for source file=" + fileInfo.toString(), e); 465 | throw e; 466 | } catch (IOException e) { 467 | LOG.error("Unable to get the status for source file=" + fileInfo.toString(), e); 468 | throw e; 469 | } 470 | } 471 | 472 | private FileChecksum getFileChecksum(final FileSystem fs, final Path path) { 473 | try { 474 | return fs.getFileChecksum(path); 475 | } catch (IOException e) { 476 | LOG.warn("Unable to get checksum for file=" + path, e); 477 | return null; 478 | } 479 | } 480 | 481 | /** 482 | * Check if the two files are equal by looking at the file length, 483 | * and at the checksum (if user has specified the verifyChecksum flag). 484 | */ 485 | private boolean sameFile(final FileStatus inputStat, final FileStatus outputStat) { 486 | // Not matching length 487 | if (inputStat.getLen() != outputStat.getLen()) return false; 488 | 489 | // Mark files as equals, since user asked for no checksum verification 490 | if (!verifyChecksum) return true; 491 | 492 | // If checksums are not available, files are not the same. 493 | FileChecksum inChecksum = getFileChecksum(inputFs, inputStat.getPath()); 494 | if (inChecksum == null) return false; 495 | 496 | FileChecksum outChecksum = getFileChecksum(outputFs, outputStat.getPath()); 497 | if (outChecksum == null) return false; 498 | 499 | return inChecksum.equals(outChecksum); 500 | } 501 | } 502 | 503 | // ========================================================================== 504 | // Input Format 505 | // ========================================================================== 506 | 507 | /** 508 | * Extract the list of files (HFiles/WALs) to copy using Map-Reduce. 509 | * @return list of files referenced by the snapshot (pair of path and size) 510 | */ 511 | private static List> getSnapshotFiles(final Configuration conf, 512 | final FileSystem fs, final Path snapshotDir) throws IOException { 513 | SnapshotDescription snapshotDesc = SnapshotDescriptionUtils.readSnapshotInfo(fs, snapshotDir); 514 | 515 | final List> files = new ArrayList>(); 516 | final TableName table = TableName.valueOf(snapshotDesc.getTable()); 517 | 518 | // Get snapshot files 519 | LOG.info("Loading Snapshot '" + snapshotDesc.getName() + "' hfile list"); 520 | SnapshotReferenceUtil.visitReferencedFiles(conf, fs, snapshotDir, snapshotDesc, 521 | new SnapshotReferenceUtil.SnapshotVisitor() { 522 | @Override 523 | public void storeFile(final HRegionInfo regionInfo, final String family, 524 | final SnapshotRegionManifest.StoreFile storeFile) throws IOException { 525 | if (storeFile.hasReference()) { 526 | // copied as part of the manifest 527 | } else { 528 | String region = regionInfo.getEncodedName(); 529 | String hfile = storeFile.getName(); 530 | Path path = HFileLink.createPath(table, region, family, hfile); 531 | 532 | SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder() 533 | .setType(SnapshotFileInfo.Type.HFILE) 534 | .setHfile(path.toString()) 535 | .build(); 536 | 537 | long size; 538 | if (storeFile.hasFileSize()) { 539 | size = storeFile.getFileSize(); 540 | } else { 541 | size = HFileLink.buildFromHFileLinkPattern(conf, path).getFileStatus(fs).getLen(); 542 | } 543 | files.add(new Pair(fileInfo, size)); 544 | } 545 | } 546 | 547 | @Override 548 | public void logFile (final String server, final String logfile) 549 | throws IOException { 550 | SnapshotFileInfo fileInfo = SnapshotFileInfo.newBuilder() 551 | .setType(SnapshotFileInfo.Type.WAL) 552 | .setWalServer(server) 553 | .setWalName(logfile) 554 | .build(); 555 | 556 | long size = new WALLink(conf, server, logfile).getFileStatus(fs).getLen(); 557 | files.add(new Pair(fileInfo, size)); 558 | } 559 | }); 560 | 561 | return files; 562 | } 563 | 564 | /** 565 | * Given a list of file paths and sizes, create around ngroups in as balanced a way as possible. 566 | * The groups created will have similar amounts of bytes. 567 | *

568 | * The algorithm used is pretty straightforward; the file list is sorted by size, 569 | * and then each group fetch the bigger file available, iterating through groups 570 | * alternating the direction. 571 | */ 572 | static List>> getBalancedSplits( 573 | final List> files, final int ngroups) { 574 | // Sort files by size, from small to big 575 | Collections.sort(files, new Comparator>() { 576 | public int compare(Pair a, Pair b) { 577 | long r = a.getSecond() - b.getSecond(); 578 | return (r < 0) ? -1 : ((r > 0) ? 1 : 0); 579 | } 580 | }); 581 | 582 | // create balanced groups 583 | List>> fileGroups = 584 | new LinkedList>>(); 585 | long[] sizeGroups = new long[ngroups]; 586 | int hi = files.size() - 1; 587 | int lo = 0; 588 | 589 | List> group; 590 | int dir = 1; 591 | int g = 0; 592 | 593 | while (hi >= lo) { 594 | if (g == fileGroups.size()) { 595 | group = new LinkedList>(); 596 | fileGroups.add(group); 597 | } else { 598 | group = fileGroups.get(g); 599 | } 600 | 601 | Pair fileInfo = files.get(hi--); 602 | 603 | // add the hi one 604 | sizeGroups[g] += fileInfo.getSecond(); 605 | group.add(fileInfo); 606 | 607 | // change direction when at the end or the beginning 608 | g += dir; 609 | if (g == ngroups) { 610 | dir = -1; 611 | g = ngroups - 1; 612 | } else if (g < 0) { 613 | dir = 1; 614 | g = 0; 615 | } 616 | } 617 | 618 | if (LOG.isDebugEnabled()) { 619 | for (int i = 0; i < sizeGroups.length; ++i) { 620 | LOG.debug("export split=" + i + " size=" + StringUtils.humanReadableInt(sizeGroups[i])); 621 | } 622 | } 623 | 624 | return fileGroups; 625 | } 626 | 627 | private static class ExportSnapshotInputFormat extends InputFormat { 628 | @Override 629 | public RecordReader createRecordReader(InputSplit split, 630 | TaskAttemptContext tac) throws IOException, InterruptedException { 631 | return new ExportSnapshotRecordReader(((ExportSnapshotInputSplit)split).getSplitKeys()); 632 | } 633 | 634 | @Override 635 | public List getSplits(JobContext context) throws IOException, InterruptedException { 636 | Configuration conf = context.getConfiguration(); 637 | Path snapshotDir = new Path(conf.get(CONF_SNAPSHOT_DIR)); 638 | FileSystem fs = FileSystem.get(snapshotDir.toUri(), conf); 639 | 640 | List> snapshotFiles = new ArrayList<>(); 641 | List> origSnapshotFiles = getSnapshotFiles(conf, fs, snapshotDir); 642 | 643 | //TODO 增加快照增量文件判断逻辑 644 | String snapshotOldPath = conf.get(CONF_SNAPSHOT_OLD_DIR); 645 | if(snapshotOldPath != null && snapshotOldPath.length() > 0) { 646 | LOG.info("测试snapshotOldDir:" + conf.get(CONF_SNAPSHOT_OLD_DIR)); 647 | Path snapshotOldDir = new Path(conf.get(CONF_SNAPSHOT_OLD_DIR)); 648 | FileSystem oldFs = FileSystem.get(snapshotOldDir.toUri(), conf); 649 | 650 | List> snapshotOldFiles = getSnapshotFiles(conf, oldFs, snapshotOldDir); 651 | Set oldFiles = new HashSet(); 652 | for(Pair pair : snapshotOldFiles) { 653 | LOG.info("测试OLD:SnapShotFileInfo:" + pair.getFirst().getHfile()); 654 | oldFiles.add(pair.getFirst().getHfile()); 655 | } 656 | 657 | for(Pair pair : origSnapshotFiles) { 658 | String hfile = pair.getFirst().getHfile(); 659 | if(!oldFiles.contains(hfile)) { 660 | LOG.info("新增的:SnapShotFileInfo:" + pair.getFirst().getHfile()); 661 | snapshotFiles.add(pair); 662 | } 663 | } 664 | } else { 665 | snapshotFiles = origSnapshotFiles; 666 | } 667 | 668 | int mappers = conf.getInt(CONF_NUM_SPLITS, 0); 669 | if (mappers == 0 && snapshotFiles.size() > 0) { 670 | mappers = 1 + (snapshotFiles.size() / conf.getInt(CONF_MAP_GROUP, 10)); 671 | mappers = Math.min(mappers, snapshotFiles.size()); 672 | conf.setInt(CONF_NUM_SPLITS, mappers); 673 | conf.setInt(MR_NUM_MAPS, mappers); 674 | } 675 | 676 | List>> groups = getBalancedSplits(snapshotFiles, mappers); 677 | List splits = new ArrayList(groups.size()); 678 | for (List> files: groups) { 679 | splits.add(new ExportSnapshotInputSplit(files)); 680 | } 681 | return splits; 682 | } 683 | 684 | private static class ExportSnapshotInputSplit extends InputSplit implements Writable { 685 | private List> files; 686 | private long length; 687 | 688 | public ExportSnapshotInputSplit() { 689 | this.files = null; 690 | } 691 | 692 | public ExportSnapshotInputSplit(final List> snapshotFiles) { 693 | this.files = new ArrayList(snapshotFiles.size()); 694 | for (Pair fileInfo: snapshotFiles) { 695 | this.files.add(new Pair( 696 | new BytesWritable(fileInfo.getFirst().toByteArray()), fileInfo.getSecond())); 697 | this.length += fileInfo.getSecond(); 698 | } 699 | } 700 | 701 | private List> getSplitKeys() { 702 | return files; 703 | } 704 | 705 | @Override 706 | public long getLength() throws IOException, InterruptedException { 707 | return length; 708 | } 709 | 710 | @Override 711 | public String[] getLocations() throws IOException, InterruptedException { 712 | return new String[] {}; 713 | } 714 | 715 | @Override 716 | public void readFields(DataInput in) throws IOException { 717 | int count = in.readInt(); 718 | files = new ArrayList>(count); 719 | length = 0; 720 | for (int i = 0; i < count; ++i) { 721 | BytesWritable fileInfo = new BytesWritable(); 722 | fileInfo.readFields(in); 723 | long size = in.readLong(); 724 | files.add(new Pair(fileInfo, size)); 725 | length += size; 726 | } 727 | } 728 | 729 | @Override 730 | public void write(DataOutput out) throws IOException { 731 | out.writeInt(files.size()); 732 | for (final Pair fileInfo: files) { 733 | 734 | fileInfo.getFirst().write(out); 735 | out.writeLong(fileInfo.getSecond()); 736 | } 737 | } 738 | } 739 | 740 | private static class ExportSnapshotRecordReader 741 | extends RecordReader { 742 | private final List> files; 743 | private long totalSize = 0; 744 | private long procSize = 0; 745 | private int index = -1; 746 | 747 | ExportSnapshotRecordReader(final List> files) { 748 | this.files = files; 749 | for (Pair fileInfo: files) { 750 | totalSize += fileInfo.getSecond(); 751 | } 752 | } 753 | 754 | @Override 755 | public void close() { } 756 | 757 | @Override 758 | public BytesWritable getCurrentKey() { return files.get(index).getFirst(); } 759 | 760 | @Override 761 | public NullWritable getCurrentValue() { return NullWritable.get(); } 762 | 763 | @Override 764 | public float getProgress() { return (float)procSize / totalSize; } 765 | 766 | @Override 767 | public void initialize(InputSplit split, TaskAttemptContext tac) { } 768 | 769 | @Override 770 | public boolean nextKeyValue() { 771 | if (index >= 0) { 772 | procSize += files.get(index).getSecond(); 773 | } 774 | return(++index < files.size()); 775 | } 776 | } 777 | } 778 | 779 | // ========================================================================== 780 | // Tool 781 | // ========================================================================== 782 | 783 | /** 784 | * Run Map-Reduce Job to perform the files copy. 785 | */ 786 | private void runCopyJob(final Path inputRoot, final Path outputRoot, 787 | final String snapshotName, final Path snapshotDir, final boolean verifyChecksum, 788 | final String filesUser, final String filesGroup, final int filesMode, 789 | final int mappers, final int bandwidthMB, final String snapshotOldName, final Path snapShotOldDir) 790 | throws IOException, InterruptedException, ClassNotFoundException { 791 | Configuration conf = getConf(); 792 | if (filesGroup != null) conf.set(CONF_FILES_GROUP, filesGroup); 793 | if (filesUser != null) conf.set(CONF_FILES_USER, filesUser); 794 | if (mappers > 0) { 795 | conf.setInt(CONF_NUM_SPLITS, mappers); 796 | conf.setInt(MR_NUM_MAPS, mappers); 797 | } 798 | conf.setInt(CONF_FILES_MODE, filesMode); 799 | conf.setBoolean(CONF_CHECKSUM_VERIFY, verifyChecksum); 800 | conf.set(CONF_OUTPUT_ROOT, outputRoot.toString()); 801 | conf.set(CONF_INPUT_ROOT, inputRoot.toString()); 802 | conf.setInt(CONF_BANDWIDTH_MB, bandwidthMB); 803 | conf.set(CONF_SNAPSHOT_NAME, snapshotName); 804 | conf.set(CONF_SNAPSHOT_DIR, snapshotDir.toString()); 805 | 806 | if(snapshotOldName != null) { 807 | conf.set(CONF_SNAPSHOT_OLD_NAME, snapshotOldName); 808 | } 809 | if(snapShotOldDir != null) { 810 | conf.set(CONF_SNAPSHOT_OLD_DIR, snapShotOldDir.toString()); 811 | } 812 | 813 | Job job = new Job(conf); 814 | job.setJobName("ExportSnapshot-" + snapshotName); 815 | if(snapshotOldName != null) { 816 | job.setJobName("ExportSnapshotIncremental-" + snapshotName); 817 | } 818 | 819 | job.setJarByClass(ExportSnapshot.class); 820 | TableMapReduceUtil.addDependencyJars(job); 821 | job.setMapperClass(ExportMapper.class); 822 | job.setInputFormatClass(ExportSnapshotInputFormat.class); 823 | job.setOutputFormatClass(NullOutputFormat.class); 824 | job.setMapSpeculativeExecution(false); 825 | job.setNumReduceTasks(0); 826 | 827 | // Acquire the delegation Tokens 828 | Configuration srcConf = HBaseConfiguration.createClusterConf(conf, null, CONF_SOURCE_PREFIX); 829 | TokenCache.obtainTokensForNamenodes(job.getCredentials(), new Path[] { inputRoot }, srcConf); 830 | 831 | Configuration destConf = HBaseConfiguration.createClusterConf(conf, null, CONF_DEST_PREFIX); 832 | TokenCache.obtainTokensForNamenodes(job.getCredentials(), new Path[] { outputRoot }, destConf); 833 | 834 | // Run the MR Job 835 | if (!job.waitForCompletion(true)) { 836 | throw new ExportSnapshotException(job.getStatus().getFailureInfo()); 837 | } 838 | } 839 | 840 | private void verifySnapshot(final Configuration baseConf, 841 | final FileSystem fs, final Path rootDir, final Path snapshotDir) throws IOException { 842 | // Update the conf with the current root dir, since may be a different cluster 843 | Configuration conf = new Configuration(baseConf); 844 | FSUtils.setRootDir(conf, rootDir); 845 | FSUtils.setFsDefault(conf, FSUtils.getRootDir(conf)); 846 | SnapshotDescription snapshotDesc = SnapshotDescriptionUtils.readSnapshotInfo(fs, snapshotDir); 847 | SnapshotReferenceUtil.verifySnapshot(conf, fs, snapshotDir, snapshotDesc); 848 | } 849 | 850 | /** 851 | * Set path ownership. 852 | */ 853 | private void setOwner(final FileSystem fs, final Path path, final String user, 854 | final String group, final boolean recursive) throws IOException { 855 | if (user != null || group != null) { 856 | if (recursive && fs.isDirectory(path)) { 857 | for (FileStatus child : fs.listStatus(path)) { 858 | setOwner(fs, child.getPath(), user, group, recursive); 859 | } 860 | } 861 | fs.setOwner(path, user, group); 862 | } 863 | } 864 | 865 | /** 866 | * Set path permission. 867 | */ 868 | private void setPermission(final FileSystem fs, final Path path, final short filesMode, 869 | final boolean recursive) throws IOException { 870 | if (filesMode > 0) { 871 | FsPermission perm = new FsPermission(filesMode); 872 | if (recursive && fs.isDirectory(path)) { 873 | for (FileStatus child : fs.listStatus(path)) { 874 | setPermission(fs, child.getPath(), filesMode, recursive); 875 | } 876 | } 877 | fs.setPermission(path, perm); 878 | } 879 | } 880 | 881 | /** 882 | * Execute the export snapshot by copying the snapshot metadata, hfiles and wals. 883 | * @return 0 on success, and != 0 upon failure. 884 | */ 885 | @Override 886 | public int run(String[] args) throws IOException { 887 | boolean verifyTarget = true; 888 | boolean verifyChecksum = true; 889 | String snapshotName = null; 890 | String snapshotOldName = null; 891 | String targetName = null; 892 | boolean overwrite = false; 893 | String filesGroup = null; 894 | String filesUser = null; 895 | Path outputRoot = null; 896 | int bandwidthMB = Integer.MAX_VALUE; 897 | int filesMode = 0; 898 | int mappers = 0; 899 | 900 | Configuration conf = getConf(); 901 | Path inputRoot = FSUtils.getRootDir(conf); 902 | 903 | // Process command line args 904 | for (int i = 0; i < args.length; i++) { 905 | String cmd = args[i]; 906 | if (cmd.equals("-snapshot")) { 907 | snapshotName = args[++i]; 908 | } else if (cmd.equals("-snapshot-old")) { 909 | snapshotOldName = args[++i]; 910 | } else if (cmd.equals("-target")) { 911 | targetName = args[++i]; 912 | } else if (cmd.equals("-copy-to")) { 913 | outputRoot = new Path(args[++i]); 914 | } else if (cmd.equals("-copy-from")) { 915 | inputRoot = new Path(args[++i]); 916 | FSUtils.setRootDir(conf, inputRoot); 917 | } else if (cmd.equals("-no-checksum-verify")) { 918 | verifyChecksum = false; 919 | } else if (cmd.equals("-no-target-verify")) { 920 | verifyTarget = false; 921 | } else if (cmd.equals("-mappers")) { 922 | mappers = Integer.parseInt(args[++i]); 923 | } else if (cmd.equals("-chuser")) { 924 | filesUser = args[++i]; 925 | } else if (cmd.equals("-chgroup")) { 926 | filesGroup = args[++i]; 927 | } else if (cmd.equals("-bandwidth")) { 928 | bandwidthMB = Integer.parseInt(args[++i]); 929 | } else if (cmd.equals("-chmod")) { 930 | filesMode = Integer.parseInt(args[++i], 8); 931 | } else if (cmd.equals("-overwrite")) { 932 | overwrite = true; 933 | } else if (cmd.equals("-h") || cmd.equals("--help")) { 934 | printUsageAndExit(); 935 | } else { 936 | System.err.println("UNEXPECTED: " + cmd); 937 | printUsageAndExit(); 938 | } 939 | } 940 | 941 | // Check user options 942 | if (snapshotName == null) { 943 | System.err.println("Snapshot name not provided."); 944 | printUsageAndExit(); 945 | } 946 | 947 | if (outputRoot == null) { 948 | System.err.println("Destination file-system not provided."); 949 | printUsageAndExit(); 950 | } 951 | 952 | if (targetName == null) { 953 | targetName = snapshotName; 954 | } 955 | 956 | Configuration srcConf = HBaseConfiguration.createClusterConf(conf, null, CONF_SOURCE_PREFIX); 957 | srcConf.setBoolean("fs." + inputRoot.toUri().getScheme() + ".impl.disable.cache", true); 958 | FileSystem inputFs = FileSystem.get(inputRoot.toUri(), srcConf); 959 | LOG.debug("inputFs=" + inputFs.getUri().toString() + " inputRoot=" + inputRoot); 960 | 961 | Configuration destConf = HBaseConfiguration.createClusterConf(conf, null, CONF_DEST_PREFIX); 962 | destConf.setBoolean("fs." + outputRoot.toUri().getScheme() + ".impl.disable.cache", true); 963 | FileSystem outputFs = FileSystem.get(outputRoot.toUri(), destConf); 964 | LOG.debug("outputFs=" + outputFs.getUri().toString() + " outputRoot=" + outputRoot.toString()); 965 | 966 | boolean skipTmp = conf.getBoolean(CONF_SKIP_TMP, false); 967 | 968 | Path snapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotName, inputRoot); 969 | 970 | Path snapShotOldDir = null; 971 | if(snapshotOldName != null) { 972 | snapShotOldDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(snapshotOldName, inputRoot); 973 | } 974 | 975 | Path snapshotTmpDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(targetName, outputRoot); 976 | Path outputSnapshotDir = SnapshotDescriptionUtils.getCompletedSnapshotDir(targetName, outputRoot); 977 | Path initialOutputSnapshotDir = skipTmp ? outputSnapshotDir : snapshotTmpDir; 978 | 979 | // Find the necessary directory which need to change owner and group 980 | Path needSetOwnerDir = SnapshotDescriptionUtils.getSnapshotRootDir(outputRoot); 981 | if (outputFs.exists(needSetOwnerDir)) { 982 | if (skipTmp) { 983 | needSetOwnerDir = outputSnapshotDir; 984 | } else { 985 | needSetOwnerDir = SnapshotDescriptionUtils.getWorkingSnapshotDir(outputRoot); 986 | if (outputFs.exists(needSetOwnerDir)) { 987 | needSetOwnerDir = snapshotTmpDir; 988 | } 989 | } 990 | } 991 | 992 | // Check if the snapshot already exists 993 | if (outputFs.exists(outputSnapshotDir)) { 994 | if (overwrite) { 995 | if (!outputFs.delete(outputSnapshotDir, true)) { 996 | System.err.println("Unable to remove existing snapshot directory: " + outputSnapshotDir); 997 | return 1; 998 | } 999 | } else { 1000 | System.err.println("The snapshot '" + targetName + 1001 | "' already exists in the destination: " + outputSnapshotDir); 1002 | return 1; 1003 | } 1004 | } 1005 | 1006 | if (!skipTmp) { 1007 | // Check if the snapshot already in-progress 1008 | if (outputFs.exists(snapshotTmpDir)) { 1009 | if (overwrite) { 1010 | if (!outputFs.delete(snapshotTmpDir, true)) { 1011 | System.err.println("Unable to remove existing snapshot tmp directory: "+snapshotTmpDir); 1012 | return 1; 1013 | } 1014 | } else { 1015 | System.err.println("A snapshot with the same name '"+ targetName +"' may be in-progress"); 1016 | System.err.println("Please check "+snapshotTmpDir+". If the snapshot has completed, "); 1017 | System.err.println("consider removing "+snapshotTmpDir+" by using the -overwrite option"); 1018 | return 1; 1019 | } 1020 | } 1021 | } 1022 | 1023 | // Step 1 - Copy fs1:/.snapshot/ to fs2:/.snapshot/.tmp/ 1024 | // The snapshot references must be copied before the hfiles otherwise the cleaner 1025 | // will remove them because they are unreferenced. 1026 | try { 1027 | LOG.info("Copy Snapshot Manifest"); 1028 | FileUtil.copy(inputFs, snapshotDir, outputFs, initialOutputSnapshotDir, false, false, conf); 1029 | } catch (IOException e) { 1030 | throw new ExportSnapshotException("Failed to copy the snapshot directory: from=" + 1031 | snapshotDir + " to=" + initialOutputSnapshotDir, e); 1032 | } finally { 1033 | if (filesUser != null || filesGroup != null) { 1034 | LOG.warn((filesUser == null ? "" : "Change the owner of " + needSetOwnerDir + " to " 1035 | + filesUser) 1036 | + (filesGroup == null ? "" : ", Change the group of " + needSetOwnerDir + " to " 1037 | + filesGroup)); 1038 | setOwner(outputFs, needSetOwnerDir, filesUser, filesGroup, true); 1039 | } 1040 | if (filesMode > 0) { 1041 | LOG.warn("Change the permission of " + needSetOwnerDir + " to " + filesMode); 1042 | setPermission(outputFs, needSetOwnerDir, (short)filesMode, true); 1043 | } 1044 | } 1045 | 1046 | // Write a new .snapshotinfo if the target name is different from the source name 1047 | if (!targetName.equals(snapshotName)) { 1048 | SnapshotDescription snapshotDesc = 1049 | SnapshotDescriptionUtils.readSnapshotInfo(inputFs, snapshotDir) 1050 | .toBuilder() 1051 | .setName(targetName) 1052 | .build(); 1053 | SnapshotDescriptionUtils.writeSnapshotInfo(snapshotDesc, snapshotTmpDir, outputFs); 1054 | } 1055 | 1056 | // Step 2 - Start MR Job to copy files 1057 | // The snapshot references must be copied before the files otherwise the files gets removed 1058 | // by the HFileArchiver, since they have no references. 1059 | try { 1060 | runCopyJob(inputRoot, outputRoot, snapshotName, snapshotDir, verifyChecksum, 1061 | filesUser, filesGroup, filesMode, mappers, bandwidthMB, snapshotOldName, snapShotOldDir); 1062 | 1063 | LOG.info("Finalize the Snapshot Export"); 1064 | if (!skipTmp) { 1065 | // Step 3 - Rename fs2:/.snapshot/.tmp/ fs2:/.snapshot/ 1066 | if (!outputFs.rename(snapshotTmpDir, outputSnapshotDir)) { 1067 | throw new ExportSnapshotException("Unable to rename snapshot directory from=" + 1068 | snapshotTmpDir + " to=" + outputSnapshotDir); 1069 | } 1070 | } 1071 | 1072 | // Step 4 - Verify snapshot integrity 1073 | if (verifyTarget) { 1074 | LOG.info("Verify snapshot integrity"); 1075 | //TODO 如果全量导出则校验 1076 | if(snapshotOldName == null || snapshotOldName.length() == 0) { 1077 | verifySnapshot(destConf, outputFs, outputRoot, outputSnapshotDir); 1078 | } 1079 | } 1080 | 1081 | LOG.info("Export Completed: " + targetName); 1082 | return 0; 1083 | } catch (Exception e) { 1084 | LOG.error("Snapshot export failed", e); 1085 | if (!skipTmp) { 1086 | outputFs.delete(snapshotTmpDir, true); 1087 | } 1088 | outputFs.delete(outputSnapshotDir, true); 1089 | return 1; 1090 | } finally { 1091 | IOUtils.closeStream(inputFs); 1092 | IOUtils.closeStream(outputFs); 1093 | } 1094 | } 1095 | 1096 | // ExportSnapshot 1097 | private void printUsageAndExit() { 1098 | System.err.printf("Usage: bin/hbase %s [options]%n", getClass().getName()); 1099 | System.err.println(" where [options] are:"); 1100 | System.err.println(" -h|-help Show this help and exit."); 1101 | System.err.println(" -snapshot NAME Snapshot to restore."); 1102 | System.err.println(" -snapshot-old NAME 此快照用于导出增量数据对比."); 1103 | System.err.println(" -copy-to NAME Remote destination hdfs://"); 1104 | System.err.println(" -copy-from NAME Input folder hdfs:// (default hbase.rootdir)"); 1105 | System.err.println(" -no-checksum-verify Do not verify checksum, use name+length only."); 1106 | System.err.println(" -no-target-verify Do not verify the integrity of the \\" + 1107 | "exported snapshot."); 1108 | System.err.println(" -overwrite Rewrite the snapshot manifest if already exists"); 1109 | System.err.println(" -chuser USERNAME Change the owner of the files " + 1110 | "to the specified one."); 1111 | System.err.println(" -chgroup GROUP Change the group of the files to " + 1112 | "the specified one."); 1113 | System.err.println(" -chmod MODE Change the permission of the files " + 1114 | "to the specified one."); 1115 | System.err.println(" -mappers Number of mappers to use during the " + 1116 | "copy (mapreduce.job.maps)."); 1117 | System.err.println(" -bandwidth Limit bandwidth to this value in MB/second."); 1118 | System.err.println(); 1119 | System.err.println("Examples:"); 1120 | System.err.println(" hbase " + getClass().getName() + " \\"); 1121 | System.err.println(" -snapshot MySnapshot -copy-to hdfs://srv2:8082/hbase \\"); 1122 | System.err.println(" -chuser MyUser -chgroup MyGroup -chmod 700 -mappers 16"); 1123 | System.err.println(); 1124 | System.err.println(" hbase " + getClass().getName() + " \\"); 1125 | System.err.println(" -snapshot MySnapshot -copy-from hdfs://srv2:8082/hbase \\"); 1126 | System.err.println(" -copy-to hdfs://srv1:50070/hbase \\"); 1127 | System.exit(1); 1128 | } 1129 | 1130 | /** 1131 | * The guts of the {@link #main} method. 1132 | * Call this method to avoid the {@link #main(String[])} System.exit. 1133 | * @param args 1134 | * @return errCode 1135 | * @throws Exception 1136 | */ 1137 | static int innerMain(final Configuration conf, final String [] args) throws Exception { 1138 | return ToolRunner.run(conf, new ExportSnapshot(), args); 1139 | } 1140 | 1141 | public static void main(String[] args) throws Exception { 1142 | System.exit(innerMain(HBaseConfiguration.create(), args)); 1143 | } 1144 | } -------------------------------------------------------------------------------- /target/balancer.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/balancer.jar -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$1.class -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$2.class -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$3.class -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$Counter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$Counter.class -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$ExportMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$ExportMapper.class -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat$ExportSnapshotInputSplit.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat$ExportSnapshotInputSplit.class -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat$ExportSnapshotRecordReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat$ExportSnapshotRecordReader.class -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat.class -------------------------------------------------------------------------------- /target/classes/org/hadoop/hbase/dataExport/ExportSnapshot.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/classes/org/hadoop/hbase/dataExport/ExportSnapshot.class -------------------------------------------------------------------------------- /target/hbase-export-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/hbase-export-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Thu Nov 02 17:36:22 CST 2017 3 | version=1.0-SNAPSHOT 4 | groupId=org.hadoop.hbase.dataExport 5 | artifactId=hbase-export 6 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | org/hadoop/hbase/dataExport/ExportSnapshot.class 2 | org/hadoop/hbase/dataExport/ExportSnapshot$ExportMapper.class 3 | org/hadoop/hbase/dataExport/ExportSnapshot$2.class 4 | org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat$ExportSnapshotInputSplit.class 5 | org/hadoop/hbase/dataExport/ExportSnapshot$Counter.class 6 | org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat$ExportSnapshotRecordReader.class 7 | org/hadoop/hbase/dataExport/ExportSnapshot$3.class 8 | org/hadoop/hbase/dataExport/ExportSnapshot$1.class 9 | org/hadoop/hbase/dataExport/ExportSnapshot$ExportSnapshotInputFormat.class 10 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | /Volumes/Transcend/work/hbaseexport/src/main/java/org/hadoop/hbase/dataExport/ExportSnapshot.java 2 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fayson/hbaseexport/008d4898b6bd411e19fbbf27a2d9ea790ca7d76f/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst --------------------------------------------------------------------------------