Return-Path: X-Original-To: apmail-hdt-commits-archive@minotaur.apache.org Delivered-To: apmail-hdt-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5533210348 for ; Thu, 25 Jul 2013 04:30:15 +0000 (UTC) Received: (qmail 2154 invoked by uid 500); 25 Jul 2013 04:30:03 -0000 Delivered-To: apmail-hdt-commits-archive@hdt.apache.org Received: (qmail 2034 invoked by uid 500); 25 Jul 2013 04:29:57 -0000 Mailing-List: contact commits-help@hdt.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hdt.incubator.apache.org Delivered-To: mailing list commits@hdt.incubator.apache.org Received: (qmail 1925 invoked by uid 99); 25 Jul 2013 04:29:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2013 04:29:49 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 25 Jul 2013 04:29:44 +0000 Received: (qmail 1874 invoked by uid 99); 25 Jul 2013 04:29:19 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2013 04:29:19 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4908B8B4716; Thu, 25 Jul 2013 04:29:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rsharma@apache.org To: commits@hdt.incubator.apache.org Date: Thu, 25 Jul 2013 04:29:24 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [8/8] git commit: HDT-32: Merge the code base of Hadoop-Eclipse project into HDT. Contributed by Srimanth Gunturi X-Virus-Checked: Checked by ClamAV on apache.org HDT-32: Merge the code base of Hadoop-Eclipse project into HDT. Contributed by Srimanth Gunturi Project: http://git-wip-us.apache.org/repos/asf/incubator-hdt/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hdt/commit/63bec260 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hdt/tree/63bec260 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hdt/diff/63bec260 Branch: refs/heads/hadoop-eclipse-merge Commit: 63bec2607fdb96f57cc5c8b71561c03bbc986502 Parents: 0a0744f Author: Rahul Sharma Authored: Thu Jul 25 09:08:50 2013 +0530 Committer: Rahul Sharma Committed: Thu Jul 25 09:11:50 2013 +0530 ---------------------------------------------------------------------- org.apache.hdt.core/.classpath | 8 + org.apache.hdt.core/.project | 28 + .../.settings/org.eclipse.core.resources.prefs | 3 + .../.settings/org.eclipse.jdt.core.prefs | 276 ++++ .../.settings/org.eclipse.jdt.ui.prefs | 6 + org.apache.hdt.core/META-INF/MANIFEST.MF | 27 + org.apache.hdt.core/build.properties | 9 + org.apache.hdt.core/models/Hadoop.ecore | 92 ++ org.apache.hdt.core/models/Hadoop.genmodel | 28 + org.apache.hdt.core/plugin.properties | 8 + org.apache.hdt.core/plugin.xml | 43 + .../org.apache.hadoop.eclipse.hdfsclient.exsd | 118 ++ ...g.apache.hadoop.eclipse.zookeeperClient.exsd | 111 ++ org.apache.hdt.core/src/log4j.properties | 17 + .../src/org/apache/hdt/core/Activator.java | 63 + .../org/apache/hdt/core/hdfs/HDFSClient.java | 114 ++ .../hdt/core/hdfs/ResourceInformation.java | 213 +++ .../apache/hdt/core/internal/HadoopManager.java | 83 ++ .../hdt/core/internal/hdfs/DownloadFileJob.java | 137 ++ .../hdt/core/internal/hdfs/HDFSFileStore.java | 594 ++++++++ .../hdt/core/internal/hdfs/HDFSFileSystem.java | 57 + .../hdt/core/internal/hdfs/HDFSManager.java | 285 ++++ .../core/internal/hdfs/HDFSMoveDeleteHook.java | 130 ++ .../hdfs/HDFSTeamRepositoryProvider.java | 41 + .../apache/hdt/core/internal/hdfs/HDFSURI.java | 73 + .../hdt/core/internal/hdfs/HDFSUtilites.java | 86 ++ .../internal/hdfs/InterruptableHDFSClient.java | 260 ++++ .../hdt/core/internal/hdfs/UploadFileJob.java | 150 ++ .../hdt/core/internal/model/HDFSServer.java | 127 ++ .../hdt/core/internal/model/HadoopFactory.java | 85 ++ .../hdt/core/internal/model/HadoopPackage.java | 1380 ++++++++++++++++++ .../apache/hdt/core/internal/model/Server.java | 175 +++ .../hdt/core/internal/model/ServerStatus.java | 247 ++++ .../apache/hdt/core/internal/model/Servers.java | 103 ++ .../apache/hdt/core/internal/model/ZNode.java | 527 +++++++ .../hdt/core/internal/model/ZNodeType.java | 251 ++++ .../core/internal/model/ZooKeeperServer.java | 35 + .../internal/model/impl/HDFSServerImpl.java | 310 ++++ .../internal/model/impl/HadoopFactoryImpl.java | 195 +++ .../internal/model/impl/HadoopPackageImpl.java | 621 ++++++++ .../core/internal/model/impl/ServerImpl.java | 395 +++++ .../core/internal/model/impl/ServersImpl.java | 271 ++++ .../hdt/core/internal/model/impl/ZNodeImpl.java | 1017 +++++++++++++ .../model/impl/ZooKeeperServerImpl.java | 1109 ++++++++++++++ .../model/util/HadoopAdapterFactory.java | 208 +++ .../core/internal/model/util/HadoopSwitch.java | 229 +++ .../zookeeper/InterruptableZooKeeperClient.java | 233 +++ .../internal/zookeeper/ZooKeeperManager.java | 162 ++ .../hdt/core/zookeeper/ZooKeeperClient.java | 45 + org.apache.hdt.feature/.project | 17 + org.apache.hdt.feature/build.properties | 1 + org.apache.hdt.feature/feature.xml | 68 + org.apache.hdt.hadoop.release/.classpath | 25 + org.apache.hdt.hadoop.release/.project | 28 + .../.settings/org.eclipse.jdt.core.prefs | 276 ++++ .../.settings/org.eclipse.jdt.ui.prefs | 6 + .../META-INF/MANIFEST.MF | 27 + org.apache.hdt.hadoop.release/build.properties | 23 + org.apache.hdt.hadoop.release/fragment.xml | 36 + .../hdt/hadoop/release/HDFSClientRelease.java | 235 +++ .../hadoop/release/ZooKeeperClientRelease.java | 215 +++ org.apache.hdt.ui.test/.classpath | 7 + org.apache.hdt.ui.test/.project | 28 + .../.settings/org.eclipse.jdt.core.prefs | 7 + org.apache.hdt.ui.test/META-INF/MANIFEST.MF | 14 + org.apache.hdt.ui.test/build.properties | 5 + org.apache.hdt.ui.test/plugin.xml | 21 + .../src/org/apache/hdt/ui/test/Activator.java | 67 + .../src/org/apache/hdt/ui/test/AllTests.java | 21 + .../org/apache/hdt/ui/test/hdfs/HDFSTests.java | 20 + .../org/apache/hdt/ui/test/hdfs/ModelTests.java | 22 + org.apache.hdt.ui/.classpath | 7 + org.apache.hdt.ui/.project | 28 + .../.settings/org.eclipse.jdt.core.prefs | 276 ++++ .../.settings/org.eclipse.jdt.ui.prefs | 6 + org.apache.hdt.ui/META-INF/MANIFEST.MF | 19 + org.apache.hdt.ui/NOTICE.txt | 2 + org.apache.hdt.ui/build.properties | 9 + org.apache.hdt.ui/plugin.xml | 424 ++++++ .../src/org/apache/hdt/ui/Activator.java | 135 ++ .../hdt/ui/internal/HadoopAdapterFactory.java | 30 + .../internal/HadoopCommonContentProvider.java | 182 +++ .../hdt/ui/internal/HadoopLabelProvider.java | 177 +++ .../ui/internal/HadoopPerspectiveFactory.java | 40 + .../hdt/ui/internal/HadoopServersView.java | 29 + .../hdfs/DiscardDownloadResourceAction.java | 132 ++ .../hdt/ui/internal/hdfs/DisconnectAction.java | 88 ++ .../internal/hdfs/DownloadResourceAction.java | 124 ++ .../hdfs/HDFSCommonContentProvider.java | 188 +++ .../hdfs/HDFSFileStorePropertySource.java | 177 +++ .../hdt/ui/internal/hdfs/HDFSLabelProvider.java | 153 ++ .../hdfs/HDFSLightweightLabelDecorator.java | 163 +++ .../ui/internal/hdfs/HDFSPropertySection.java | 182 +++ .../ui/internal/hdfs/NewHDFSServerAction.java | 62 + .../internal/hdfs/NewHDFSServerWizardPage.java | 242 +++ .../hdt/ui/internal/hdfs/NewHDFSWizard.java | 96 ++ .../ui/internal/hdfs/PropertyTypeMapper.java | 29 + .../hdt/ui/internal/hdfs/ReconnectAction.java | 88 ++ .../ui/internal/hdfs/UploadResourceAction.java | 123 ++ .../hdt/ui/internal/zookeeper/DeleteAction.java | 119 ++ .../ui/internal/zookeeper/DisconnectAction.java | 95 ++ .../zookeeper/NewZooKeeperServerAction.java | 62 + .../zookeeper/NewZooKeeperServerWizardPage.java | 129 ++ .../internal/zookeeper/NewZooKeeperWizard.java | 81 + .../hdt/ui/internal/zookeeper/OpenAction.java | 102 ++ .../ui/internal/zookeeper/ReconnectAction.java | 95 ++ .../ui/internal/zookeeper/RefreshAction.java | 85 ++ .../internal/zookeeper/ZNodePropertySource.java | 226 +++ .../ZooKeeperCommonContentProvider.java | 187 +++ .../zookeeper/ZooKeeperLabelProvider.java | 87 ++ .../ZooKeeperLightweightLabelDecorator.java | 67 + .../zookeeper/ZooKeeperNodeEditorInput.java | 126 ++ .../zookeeper/ZooKeeperNodeStorage.java | 94 ++ org.apache.hdt.updateSite/.project | 17 + org.apache.hdt.updateSite/site.xml | 7 + 115 files changed, 16744 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/.classpath ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/.classpath b/org.apache.hdt.core/.classpath new file mode 100644 index 0000000..c5158db --- /dev/null +++ b/org.apache.hdt.core/.classpath @@ -0,0 +1,8 @@ + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/.project ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/.project b/org.apache.hdt.core/.project new file mode 100644 index 0000000..bb03cc0 --- /dev/null +++ b/org.apache.hdt.core/.project @@ -0,0 +1,28 @@ + + + org.apache.hdt.core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/.settings/org.eclipse.core.resources.prefs ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/.settings/org.eclipse.core.resources.prefs b/org.apache.hdt.core/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..fc54be2 --- /dev/null +++ b/org.apache.hdt.core/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +#Wed Mar 13 23:19:03 PDT 2013 +eclipse.preferences.version=1 +encoding//models/Hadoop.ecore=UTF-8 http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/.settings/org.eclipse.jdt.core.prefs ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/.settings/org.eclipse.jdt.core.prefs b/org.apache.hdt.core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..9e90209 --- /dev/null +++ b/org.apache.hdt.core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,276 @@ +#Mon Mar 18 00:41:50 PDT 2013 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=160 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=false http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/.settings/org.eclipse.jdt.ui.prefs ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/.settings/org.eclipse.jdt.ui.prefs b/org.apache.hdt.core/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000..7223ecf --- /dev/null +++ b/org.apache.hdt.core/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,6 @@ +#Thu Mar 21 01:21:51 PDT 2013 +eclipse.preferences.version=1 +formatter_profile=_Apache Hadoop Eclipse Format +formatter_settings_version=11 +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.text.custom_code_templates=/**\n * @author Srimanth Gunturi\n *\n * ${tags}\n */ http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/META-INF/MANIFEST.MF ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/META-INF/MANIFEST.MF b/org.apache.hdt.core/META-INF/MANIFEST.MF new file mode 100644 index 0000000..c3d206a --- /dev/null +++ b/org.apache.hdt.core/META-INF/MANIFEST.MF @@ -0,0 +1,27 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Apache Hadoop Eclipse Plugin +Bundle-SymbolicName: org.apache.hdt.core;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.apache.hdt.core.Activator +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.filesystem;bundle-version="1.3.0";visibility:=reexport, + org.eclipse.core.resources;bundle-version="3.6.0", + org.eclipse.emf.ecore;bundle-version="2.6.1";visibility:=reexport, + org.eclipse.team.core;bundle-version="3.5.100" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-Vendor: Apache Hadoop +Bundle-ClassPath: lib/log4j/log4j-1.2.17.jar, + . +Export-Package: org.apache.hdt.core, + org.apache.hdt.core.hdfs, + org.apache.hdt.core.internal, + org.apache.hdt.core.internal.hdfs;x-friends:="org.apache.hdt.ui", + org.apache.hdt.core.internal.model, + org.apache.hdt.core.internal.model.impl, + org.apache.hdt.core.internal.model.util, + org.apache.hdt.core.internal.zookeeper, + org.apache.hdt.core.zookeeper, + org.apache.log4j, + org.apache.log4j.config +Bundle-ActivationPolicy: lazy http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/build.properties ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/build.properties b/org.apache.hdt.core/build.properties new file mode 100644 index 0000000..f06f871 --- /dev/null +++ b/org.apache.hdt.core/build.properties @@ -0,0 +1,9 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + lib/log4j/log4j-1.2.17.jar +src.includes = src/,\ + schema/,\ + models/ http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/models/Hadoop.ecore ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/models/Hadoop.ecore b/org.apache.hdt.core/models/Hadoop.ecore new file mode 100644 index 0000000..680666b --- /dev/null +++ b/org.apache.hdt.core/models/Hadoop.ecore @@ -0,0 +1,92 @@ + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/models/Hadoop.genmodel ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/models/Hadoop.genmodel b/org.apache.hdt.core/models/Hadoop.genmodel new file mode 100644 index 0000000..97586d4 --- /dev/null +++ b/org.apache.hdt.core/models/Hadoop.genmodel @@ -0,0 +1,28 @@ + + + Hadoop.ecore + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/plugin.properties ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/plugin.properties b/org.apache.hdt.core/plugin.properties new file mode 100644 index 0000000..5d65d5d --- /dev/null +++ b/org.apache.hdt.core/plugin.properties @@ -0,0 +1,8 @@ + +# +# +# +# $Id$ + +pluginName = Hadoop Model +providerName = www.example.org http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/plugin.xml ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/plugin.xml b/org.apache.hdt.core/plugin.xml new file mode 100644 index 0000000..82dcbec --- /dev/null +++ b/org.apache.hdt.core/plugin.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/schema/org.apache.hadoop.eclipse.hdfsclient.exsd ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/schema/org.apache.hadoop.eclipse.hdfsclient.exsd b/org.apache.hdt.core/schema/org.apache.hadoop.eclipse.hdfsclient.exsd new file mode 100644 index 0000000..51da7df --- /dev/null +++ b/org.apache.hdt.core/schema/org.apache.hadoop.eclipse.hdfsclient.exsd @@ -0,0 +1,118 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/schema/org.apache.hadoop.eclipse.zookeeperClient.exsd ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/schema/org.apache.hadoop.eclipse.zookeeperClient.exsd b/org.apache.hdt.core/schema/org.apache.hadoop.eclipse.zookeeperClient.exsd new file mode 100644 index 0000000..b89a826 --- /dev/null +++ b/org.apache.hdt.core/schema/org.apache.hadoop.eclipse.zookeeperClient.exsd @@ -0,0 +1,111 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/log4j.properties ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/src/log4j.properties b/org.apache.hdt.core/src/log4j.properties new file mode 100644 index 0000000..4337f2a --- /dev/null +++ b/org.apache.hdt.core/src/log4j.properties @@ -0,0 +1,17 @@ +log4j.rootLogger=WARN, A1 +log4j.appender.A1=org.apache.log4j.ConsoleAppender +log4j.appender.A1.layout=org.apache.log4j.PatternLayout + +# Print the date in ISO 8601 format +log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n + +# Print only messages of level WARN or above in the package com.foo. +log4j.logger.org.apache.hadoop.eclipse.internal.HadoopCommonContentProvider=DEBUG +#log4j.logger.org.apache.hadoop.eclipse.internal.hdfs=DEBUG +#log4j.logger.org.apache.hadoop.eclipse.internal.hdfs.HDFSFileStore=DEBUG +#log4j.logger.org.apache.hadoop.eclipse.internal.hdfs.HDFSManager=DEBUG +#log4j.logger.org.apache.hadoop.eclipse.internal.hdfs.DownloadFileJob=DEBUG +#log4j.logger.org.apache.hadoop.eclipse.internal.hdfs.UploadFileJob=DEBUG +log4j.logger.org.apache.hadoop.eclipse.internal.zookeeper=DEBUG +log4j.logger.org.apache.hadoop.eclipse.ui.internal.zookeeper=DEBUG +log4j.logger.org.apache.hadoop.eclipse.release=DEBUG \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/Activator.java ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/Activator.java b/org.apache.hdt.core/src/org/apache/hdt/core/Activator.java new file mode 100644 index 0000000..df59f32 --- /dev/null +++ b/org.apache.hdt.core/src/org/apache/hdt/core/Activator.java @@ -0,0 +1,63 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hdt.core; + +import org.apache.hdt.core.internal.HadoopManager; +import org.apache.hdt.core.internal.model.impl.HadoopPackageImpl; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +/** + * + * @author Srimanth Gunturi + */ +public class Activator implements BundleActivator { + + public static final String BUNDLE_ID = "org.apache.hdt.core"; + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext bundleContext) throws Exception { + Activator.context = bundleContext; + HadoopPackageImpl.init(); + HadoopManager.INSTANCE.getServers(); + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + HadoopManager.INSTANCE.saveServers(); + Activator.context = null; + } + +} http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/hdfs/HDFSClient.java ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/hdfs/HDFSClient.java b/org.apache.hdt.core/src/org/apache/hdt/core/hdfs/HDFSClient.java new file mode 100644 index 0000000..651f0c7 --- /dev/null +++ b/org.apache.hdt.core/src/org/apache/hdt/core/hdfs/HDFSClient.java @@ -0,0 +1,114 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hdt.core.hdfs; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URI; +import java.util.List; + +/** + * + * @author Srimanth Gunturi + */ +public abstract class HDFSClient { + /** + * Provides the default userId and groupIds. + * + * @return List of ids. First ID has to be of the user. Group IDs are + * optional. + * @throws IOException + * @throws InterruptedException + */ + public abstract List getDefaultUserAndGroupIds() throws IOException, InterruptedException; + + /** + * + * @param uri + * @param user + * @return + * @throws IOException + * @throws InterruptedException + */ + public abstract ResourceInformation getResourceInformation(URI uri, String user) throws IOException, InterruptedException; + + /** + * + * @param uri + * @param information + * @param user + * @throws IOException + * @throws InterruptedException + */ + public abstract void setResourceInformation(URI uri, ResourceInformation information, String user) throws IOException, InterruptedException; + + /** + * + * @param uri + * @param user + * @return + * @throws IOException + * @throws InterruptedException + */ + public abstract List listResources(URI uri, String user) throws IOException, InterruptedException; + + /** + * @param uri + * @param user + * @return + * @throws InterruptedException + */ + public abstract InputStream openInputStream(URI uri, String user) throws IOException, InterruptedException; + + /** + * + * @param uri + * @param user + * @return + * @throws IOException + * @throws InterruptedException + */ + public abstract boolean mkdirs(URI uri, String user) throws IOException, InterruptedException; + + /** + * @param uri + * @param user + * @return + * @throws IOException + * @throws InterruptedException + */ + public abstract OutputStream openOutputStream(URI uri, String user) throws IOException, InterruptedException; + + /** + * @param uri + * @param monitor + * @return + * @throws IOException + * @throws InterruptedException + */ + public abstract OutputStream createOutputStream(URI uri, String user) throws IOException, InterruptedException; + + /** + * @param uri + * @param user + * @throws InterruptedException + */ + public abstract void delete(URI uri, String user) throws IOException, InterruptedException; +} http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/hdfs/ResourceInformation.java ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/hdfs/ResourceInformation.java b/org.apache.hdt.core/src/org/apache/hdt/core/hdfs/ResourceInformation.java new file mode 100644 index 0000000..2206287 --- /dev/null +++ b/org.apache.hdt.core/src/org/apache/hdt/core/hdfs/ResourceInformation.java @@ -0,0 +1,213 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hdt.core.hdfs; + +import java.util.List; + +public class ResourceInformation { + public static class Permissions { + public boolean read = true; + public boolean write = true; + public boolean execute = true; + + public Permissions() { + } + + public Permissions(boolean read, boolean write, boolean execute) { + this.read = read; + this.write = write; + this.execute = execute; + } + + public void copy(Permissions copyFrom) { + this.read = copyFrom.read; + this.write = copyFrom.write; + this.execute = copyFrom.execute; + } + } + + private String name; + private String path; + private long lastModifiedTime = -1; + private long lastAccessedTime = -1; + private boolean isFolder; + private long size; + private short replicationFactor; + private String owner; + private String group; + private Permissions userPermissions = new Permissions(); + private Permissions groupPermissions = new Permissions(); + private Permissions otherPermissions = new Permissions(); + private Permissions effectivePermissions = new Permissions(); + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name + * the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the lastModifiedTime + */ + public long getLastModifiedTime() { + return lastModifiedTime; + } + + /** + * @param lastModifiedTime + * the lastModifiedTime to set + */ + public void setLastModifiedTime(long lastModifiedTime) { + this.lastModifiedTime = lastModifiedTime; + } + + /** + * @return the lastAccessedTime + */ + public long getLastAccessedTime() { + return lastAccessedTime; + } + + /** + * @param lastAccessedTime + * the lastAccessedTime to set + */ + public void setLastAccessedTime(long lastAccessedTime) { + this.lastAccessedTime = lastAccessedTime; + } + + /** + * @return the isFolder + */ + public boolean isFolder() { + return isFolder; + } + + /** + * @param isFolder + * the isFolder to set + */ + public void setFolder(boolean isFolder) { + this.isFolder = isFolder; + } + + public void setSize(long size) { + this.size = size; + } + + public long getSize() { + return size; + } + + public void setPath(String path) { + this.path = path; + } + + public String getPath() { + return path; + } + + public void setReplicationFactor(short replicationFactor) { + this.replicationFactor = replicationFactor; + } + + public short getReplicationFactor() { + return replicationFactor; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public String getOwner() { + return owner; + } + + public void setGroup(String group) { + this.group = group; + } + + public String getGroup() { + return group; + } + + public void setUserPermissions(Permissions userPermissions) { + this.userPermissions = userPermissions; + } + + public Permissions getUserPermissions() { + return userPermissions; + } + + public void setGroupPermissions(Permissions groupPermissions) { + this.groupPermissions = groupPermissions; + } + + public Permissions getGroupPermissions() { + return groupPermissions; + } + + public void setOtherPermissions(Permissions otherPermissions) { + this.otherPermissions = otherPermissions; + } + + public Permissions getOtherPermissions() { + return otherPermissions; + } + + /** + * Effective permissions of this resource for the caller. + * + * @return {@link Permissions} + */ + public Permissions getEffectivePermissions() { + return effectivePermissions; + } + + /** + * Updates the effective permissions for the provided user and groups. This + * updates {@link #isRead()}, {@link #isWrite()} and {@link #isExecute()} + * + * @param user + * @param groups + */ + public void updateEffectivePermissions(String user, List groups) { + if (user != null) { + if (getOwner().equals(user)) { + // Owner permissions apply + this.effectivePermissions.copy(this.userPermissions); + } else if (groups!=null && groups.contains(getGroup())) { + // Group permissions apply + this.effectivePermissions.copy(this.groupPermissions); + } else { + // Other permissions apply + this.effectivePermissions.copy(this.otherPermissions); + } + } + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/internal/HadoopManager.java ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/internal/HadoopManager.java b/org.apache.hdt.core/src/org/apache/hdt/core/internal/HadoopManager.java new file mode 100644 index 0000000..937b171 --- /dev/null +++ b/org.apache.hdt.core/src/org/apache/hdt/core/internal/HadoopManager.java @@ -0,0 +1,83 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hdt.core.internal; + +import java.io.File; +import java.io.IOException; +import java.util.Collections; + +import org.apache.hdt.core.Activator; +import org.apache.hdt.core.internal.hdfs.HDFSManager; +import org.apache.hdt.core.internal.model.HadoopFactory; +import org.apache.hdt.core.internal.model.Servers; +import org.apache.hdt.core.internal.zookeeper.ZooKeeperManager; +import org.apache.log4j.Logger; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.osgi.framework.Bundle; + +/** + * @author Srimanth Gunturi + * + */ +public class HadoopManager { + private static final Logger logger = Logger.getLogger(HadoopManager.class); + private static final String MODEL_FILE_NAME = "servers.xmi"; + public static HadoopManager INSTANCE = new HadoopManager(); + + private Servers servers = null; + + private HadoopManager() { + } + + public Servers getServers() { + if (servers == null) { + loadServers(); + if (servers == null) { + Bundle bundle = Platform.getBundle(Activator.BUNDLE_ID); + File serversFile = bundle.getBundleContext().getDataFile(MODEL_FILE_NAME); + Resource resource = new ResourceSetImpl().createResource(URI.createFileURI(serversFile.getPath())); + servers = HadoopFactory.eINSTANCE.createServers(); + resource.getContents().add(servers); + } + } + return servers; + } + + private void loadServers() { + Bundle bundle = Platform.getBundle(Activator.BUNDLE_ID); + File serversFile = bundle.getBundleContext().getDataFile(MODEL_FILE_NAME); + if (serversFile.exists()) { + Resource resource = new ResourceSetImpl().getResource(URI.createFileURI(serversFile.getPath()), true); + servers = (Servers) resource.getContents().get(0); + HDFSManager.INSTANCE.loadServers(); + ZooKeeperManager.INSTANCE.loadServers(); + } + } + + public void saveServers() { + try { + servers.eResource().save(Collections.EMPTY_MAP); + } catch (IOException e) { + logger.error("Unable to persist Hadoop servers model", e); + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-hdt/blob/63bec260/org.apache.hdt.core/src/org/apache/hdt/core/internal/hdfs/DownloadFileJob.java ---------------------------------------------------------------------- diff --git a/org.apache.hdt.core/src/org/apache/hdt/core/internal/hdfs/DownloadFileJob.java b/org.apache.hdt.core/src/org/apache/hdt/core/internal/hdfs/DownloadFileJob.java new file mode 100644 index 0000000..cd40ab4 --- /dev/null +++ b/org.apache.hdt.core/src/org/apache/hdt/core/internal/hdfs/DownloadFileJob.java @@ -0,0 +1,137 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hdt.core.internal.hdfs; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; + +import org.apache.hdt.core.Activator; +import org.apache.log4j.Logger; +import org.eclipse.core.filesystem.EFS; +import org.eclipse.core.filesystem.IFileInfo; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; + +/** + * @author Srimanth Gunturi + * + */ +public class DownloadFileJob extends Job { + + private final static Logger logger = Logger.getLogger(DownloadFileJob.class); + private final HDFSFileStore store; + private final IResource resource; + + /** + * @throws CoreException + * + */ + public DownloadFileJob(IResource resource) throws CoreException { + super("Downloading " + resource.getLocationURI().toString()); + this.resource = resource; + this.store = (HDFSFileStore) EFS.getStore(resource.getLocationURI()); + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.core.resources.IWorkspaceRunnable#run(org.eclipse.core.runtime + * .IProgressMonitor) + */ + @Override + public IStatus run(IProgressMonitor monitor) { + IStatus status = Status.OK_STATUS; + if (store != null) { + URI uri = store.toURI(); + try { + File localFile = store.getLocalFile(); + if (logger.isDebugEnabled()) + logger.debug("[" + uri + "]: Downloading to " + (localFile == null ? "(null)" : localFile.toString())); + HDFSManager.INSTANCE.startServerOperation(uri.toString()); + final IFileInfo serverInfo = store.fetchInfo(); + if (serverInfo.exists()) { + monitor.beginTask("Downloading " + uri.toString(), (int) serverInfo.getLength()); + if (!localFile.exists()) { + localFile.getParentFile().mkdirs(); + localFile.createNewFile(); + } + InputStream openInputStream = store.openRemoteInputStream(EFS.NONE, new NullProgressMonitor()); + FileOutputStream fos = new FileOutputStream(localFile); + try { + if (!monitor.isCanceled()) { + byte[] data = new byte[8 * 1024]; + int totalRead = 0; + int read = openInputStream.read(data); + while (read > -1) { + if (monitor.isCanceled()) + throw new InterruptedException(); + fos.write(data, 0, read); + totalRead += read; + monitor.worked(read); + read = openInputStream.read(data); + if (logger.isDebugEnabled()) + logger.debug("Downloaded " + totalRead + " out of " + serverInfo.getLength() + " [" + (((float)totalRead*100.0f) / (float)serverInfo.getLength()) + + "]"); + } + } + } catch (IOException e) { + throw e; + } catch (InterruptedException e) { + throw e; + } finally { + try { + openInputStream.close(); + } catch (Throwable t) { + } + try { + fos.close(); + } catch (Throwable t) { + } + monitor.done(); + } + } else + throw new CoreException(new Status(IStatus.ERROR, Activator.BUNDLE_ID, "Server resource not found [" + uri + "]")); + resource.refreshLocal(IResource.DEPTH_ONE, new NullProgressMonitor()); + } catch (InterruptedException e) { + logger.warn(e); + } catch (CoreException e) { + logger.warn(e); + status = e.getStatus(); + } catch (FileNotFoundException e) { + logger.warn(e); + status = new Status(IStatus.ERROR, Activator.BUNDLE_ID, "Local file not found for writing server content [" + uri + "]", e); + } catch (IOException e) { + logger.warn(e); + status = new Status(IStatus.ERROR, Activator.BUNDLE_ID, "Error downloading file content [" + uri + "]", e); + } finally { + HDFSManager.INSTANCE.stopServerOperation(uri.toString()); + } + } + return status; + } +}