summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMahadev Konar <mahadev@apache.org>2012-12-13 02:03:13 +0000
committerMahadev Konar <mahadev@apache.org>2012-12-13 02:03:13 +0000
commitb87dc45ed36daeb9823df1a1849cc8b67fbd6a86 (patch)
tree4d657ba4961173c72f71562111e99e1813652c03 /contrib
parent3afc913756dfe80f6dd75bc9d6da9d4b9ec2704e (diff)
Merging AMBARI-666 to trunk.
git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1421062 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ambari-log4j/.classpath56
-rw-r--r--contrib/ambari-log4j/.project14
-rw-r--r--contrib/ambari-log4j/.settings/org.eclipse.jdt.core.prefs274
-rw-r--r--contrib/ambari-log4j/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--contrib/ambari-log4j/README.md10
-rw-r--r--contrib/ambari-log4j/pom.xml11
-rw-r--r--contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/db/DBConnector.java36
-rw-r--r--contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.java192
-rw-r--r--contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/model/Jobs.java206
-rw-r--r--contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/model/Workflows.java166
-rw-r--r--contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/webservice/JAXBContextResolver.java72
-rw-r--r--contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java84
-rw-r--r--contrib/ambari-log4j/src/main/java/org/apache/ambari/log4j/hadoop/mapreduce/jobhistory/MapReduceJobHistoryUpdater.java53
-rw-r--r--contrib/ambari-log4j/src/main/resources/ambari.schema1
-rw-r--r--contrib/ambari-log4j/src/main/webapp/WEB-INF/web.xml50
15 files changed, 409 insertions, 820 deletions
diff --git a/contrib/ambari-log4j/.classpath b/contrib/ambari-log4j/.classpath
new file mode 100644
index 0000000000..f040cdfed3
--- /dev/null
+++ b/contrib/ambari-log4j/.classpath
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.2.7/jaxb-api-2.2.7.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/hadoop/hadoop-tools/1.1.0.1/hadoop-tools-1.1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/hadoop/hadoop-core/1.1.0.1/hadoop-core-1.1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xmlenc/xmlenc/0.52/xmlenc-0.52.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/2.1/commons-io-2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/commons/commons-math/2.1/commons-math-2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.4/commons-lang-2.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-digester/commons-digester/1.8/commons-digester-1.8.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-net/commons-net/1.4.1/commons-net-1.4.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/oro/oro/2.0.8/oro-2.0.8.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar"/>
+ <classpathentry kind="var" path="M2_REPO/tomcat/jasper-runtime/5.5.12/jasper-runtime-5.5.12.jar"/>
+ <classpathentry kind="var" path="M2_REPO/tomcat/jasper-compiler/5.5.12/jasper-compiler-5.5.12.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jsp-api-2.1/6.1.14/jsp-api-2.1-6.1.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/servlet-api-2.5/6.1.14/servlet-api-2.5-6.1.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jsp-2.1/6.1.14/jsp-2.1-6.1.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/eclipse/jdt/core/3.1.1/core-3.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/ant/ant/1.6.5/ant-1.6.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-el/commons-el/1.0/commons-el-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/jets3t/jets3t/0.7.1/jets3t-0.7.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sf/kosmosfs/kfs/0.3/kfs-0.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/hsqldb/hsqldb/1.8.0.10/hsqldb-1.8.0.10.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.9.2/jackson-mapper-asl-1.9.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.9.2/jackson-core-asl-1.9.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.15/log4j-1.2.15.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-json/1.13/jersey-json-1.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-jaxrs/1.9.2/jackson-jaxrs-1.9.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-xc/1.9.2/jackson-xc-1.9.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-core/1.13/jersey-core-1.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-servlet/1.13/jersey-servlet-1.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/jersey/jersey-server/1.13/jersey-server-1.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/asm/asm/3.1/asm-3.1.jar"/>
+</classpath> \ No newline at end of file
diff --git a/contrib/ambari-log4j/.project b/contrib/ambari-log4j/.project
new file mode 100644
index 0000000000..4c587b1a70
--- /dev/null
+++ b/contrib/ambari-log4j/.project
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ambari-log4j</name>
+ <comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription> \ No newline at end of file
diff --git a/contrib/ambari-log4j/.settings/org.eclipse.jdt.core.prefs b/contrib/ambari-log4j/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..0e775e9062
--- /dev/null
+++ b/contrib/ambari-log4j/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,274 @@
+#Fri Nov 30 14:56:34 PST 2012
+eclipse.preferences.version=1
+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.comment.preserve_white_space_between_code_and_line_comments=false
+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=2
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+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_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=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_annotation_on_type=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=80
+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=space
+org.eclipse.jdt.core.formatter.tabulation.size=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/contrib/ambari-log4j/.settings/org.eclipse.jdt.ui.prefs b/contrib/ambari-log4j/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..ecc4e6d1aa
--- /dev/null
+++ b/contrib/ambari-log4j/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Fri Nov 30 14:56:34 PST 2012
+eclipse.preferences.version=1
+formatter_profile=_hadoop
+formatter_settings_version=12
diff --git a/contrib/ambari-log4j/README.md b/contrib/ambari-log4j/README.md
index 2ce9dc8e08..98c70e82aa 100644
--- a/contrib/ambari-log4j/README.md
+++ b/contrib/ambari-log4j/README.md
@@ -13,11 +13,13 @@ from src/main/resources/ambari.schema.
Build by running mvn clean package. Copy the resulting ambari-log4j jar
from the target directory into the hadoop lib directory for the
-JobTracker. Also copy postgresql-9.1-902.jdbc4.jar into the hadoop
-lib directory for the JobTracker.
+JobTracker. Also copy postgresql-9.1-902.jdbc4.jar into the hadoop lib
+directory for the JobTracker.
Add the following to your log4j.properties for the JobTracker, setting
-<username> and <password> as appropriate for your postgres DB:
+<username> and <password> as appropriate for your postgres DB. Then,
+when you start the JobTracker, use the following command:
+HADOOP_OPTS="$HADOOP_OPTS -Dambari.jobhistory.logger=DEBUG,JHA" bin/hadoop-daemon.sh start jobtracker
----
#
@@ -28,7 +30,7 @@ ambari.jobhistory.database=jdbc:postgresql://localhost:5432/ambari
ambari.jobhistory.driver=org.postgresql.Driver
ambari.jobhistory.user=<username>
ambari.jobhistory.password=<password>
-ambari.jobhistory.logger=DEBUG,JHA
+ambari.jobhistory.logger=${hadoop.root.logger}
log4j.appender.JHA=org.apache.ambari.log4j.hadoop.mapreduce.jobhistory.JobHistoryAppender
log4j.appender.JHA.database=${ambari.jobhistory.database}
diff --git a/contrib/ambari-log4j/pom.xml b/contrib/ambari-log4j/pom.xml
index 9c2aa08bf3..2bdb0094af 100644
--- a/contrib/ambari-log4j/pom.xml
+++ b/contrib/ambari-log4j/pom.xml
@@ -23,12 +23,12 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-tools</artifactId>
- <version>1.1.0.1</version>
+ <version>1.1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
- <version>1.1.0.1</version>
+ <version>1.1.1.1</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
@@ -141,6 +141,9 @@
<mappings>
<mapping>
<directory>/usr/lib/hadoop/lib</directory>
+ <filemode>644</filemode>
+ <username>root</username>
+ <groupname>root</groupname>
<sources>
<source>
<location>target/ambari-log4j-${project.version}.jar</location>
@@ -150,7 +153,9 @@
</mapping>
<mapping>
<directory>/usr/lib/hadoop/lib</directory>
- <filemode>750</filemode>
+ <filemode>644</filemode>
+ <username>root</username>
+ <groupname>root</groupname>
<dependency>
<includes>
<include>postgresql:postgresql</include>
diff --git a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/db/DBConnector.java b/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/db/DBConnector.java
deleted file mode 100644
index 8467eaf718..0000000000
--- a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/db/DBConnector.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * 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.ambari.eventdb.db;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.apache.ambari.eventdb.model.WorkflowContext;
-import org.apache.ambari.eventdb.model.Jobs.JobDBEntry;
-import org.apache.ambari.eventdb.model.Workflows.WorkflowDBEntry;
-
-public interface DBConnector {
- public void submitJob(JobDBEntry j, WorkflowContext context) throws IOException;
-
- public void updateJob(JobDBEntry j) throws IOException;
-
- public List<WorkflowDBEntry> fetchWorkflows() throws IOException;
-
- public List<JobDBEntry> fetchJobDetails(String workflowID) throws IOException;
-
- public void close();
-}
diff --git a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.java b/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.java
deleted file mode 100644
index 5f21f9c0d7..0000000000
--- a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/db/PostgresConnector.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * 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.ambari.eventdb.db;
-
-import java.io.IOException;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.EnumMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.ambari.eventdb.model.WorkflowContext;
-import org.apache.ambari.eventdb.model.Jobs.JobDBEntry;
-import org.apache.ambari.eventdb.model.Jobs.JobDBEntry.JobFields;
-import org.apache.ambari.eventdb.model.Workflows.WorkflowDBEntry;
-import org.apache.ambari.eventdb.model.Workflows.WorkflowDBEntry.WorkflowFields;
-import org.apache.commons.lang.NotImplementedException;
-import org.codehaus.jackson.map.ObjectMapper;
-
-public class PostgresConnector implements DBConnector {
- private static final String WORKFLOW_TABLE_NAME = "workflow";
- private static final String JOB_TABLE_NAME = "job";
-
- private static final ObjectMapper jsonMapper = new ObjectMapper();
-
- private Connection db;
-
- public static enum Statements {
- SJ_INSERT_JOB_PS(""),
- SJ_CHECK_WORKFLOW_PS(""),
- SJ_INSERT_WORKFLOW_PS(""),
- UJ_UPDATE_JOB_PS(""),
- UJ_UPDATE_WORKFLOW_PS(""),
- FW_PS("SELECT " + WorkflowDBEntry.WORKFLOW_FIELDS + " FROM " + WORKFLOW_TABLE_NAME),
- FJD_PS("SELECT " + JobDBEntry.JOB_FIELDS + " FROM " + JOB_TABLE_NAME + " WHERE " + JobFields.WORKFLOWID.toString() + " = ?");
-
- private String statementString;
-
- Statements(String statementString) {
- this.statementString = statementString;
- }
-
- public String getStatementString() {
- return statementString;
- }
- }
-
- private Map<Statements,PreparedStatement> preparedStatements = new EnumMap<Statements,PreparedStatement>(Statements.class);
-
- public PostgresConnector(String hostname, String dbname, String username, String password) throws IOException {
- String url = "jdbc:postgresql://" + hostname + "/" + dbname;
- try {
- Class.forName("org.postgresql.Driver");
- db = DriverManager.getConnection(url, username, password);
- } catch (ClassNotFoundException e) {
- db = null;
- throw new IOException(e);
- } catch (SQLException e) {
- db = null;
- throw new IOException(e);
- }
- }
-
- @Override
- public void submitJob(JobDBEntry j, WorkflowContext context) throws IOException {
- PreparedStatement insertJobPS = getPS(Statements.SJ_INSERT_JOB_PS);
- PreparedStatement checkWorkflowPS = getPS(Statements.SJ_CHECK_WORKFLOW_PS);
- PreparedStatement insertWorkflowPS = getPS(Statements.SJ_INSERT_WORKFLOW_PS);
- throw new NotImplementedException();
- }
-
- @Override
- public void updateJob(JobDBEntry j) throws IOException {
- PreparedStatement updateJobPS = getPS(Statements.UJ_UPDATE_JOB_PS);
- PreparedStatement updateWorkflowPS = getPS(Statements.UJ_UPDATE_WORKFLOW_PS);
- throw new NotImplementedException();
- }
-
- @Override
- public List<WorkflowDBEntry> fetchWorkflows() throws IOException {
- PreparedStatement ps = getPS(Statements.FW_PS);
- List<WorkflowDBEntry> workflows = new ArrayList<WorkflowDBEntry>();
- try {
- ResultSet rs = ps.executeQuery();
- while (rs.next()) {
- WorkflowDBEntry w = new WorkflowDBEntry();
- w.setWorkflowId(WorkflowFields.WORKFLOWID.getString(rs));
- w.setWorkflowName(WorkflowFields.WORKFLOWNAME.getString(rs));
- w.setUserName(WorkflowFields.USERNAME.getString(rs));
- w.setStartTime(WorkflowFields.STARTTIME.getLong(rs));
- long updateTime = WorkflowFields.LASTUPDATETIME.getLong(rs);
- if (updateTime > w.getStartTime())
- w.setElapsedTime(updateTime - w.getStartTime());
- else
- w.setElapsedTime(0);
- w.setNumJobsTotal(WorkflowFields.NUMJOBSTOTAL.getInt(rs));
- w.setNumJobsCompleted(WorkflowFields.NUMJOBSCOMPLETED.getInt(rs));
- w.setWorkflowContext(jsonMapper.readValue(WorkflowFields.WORKFLOWCONTEXT.getString(rs), WorkflowContext.class));
- workflows.add(w);
- }
- rs.close();
- } catch (SQLException e) {
- throw new IOException(e);
- }
- return workflows;
- }
-
- @Override
- public List<JobDBEntry> fetchJobDetails(String workflowId) throws IOException {
- PreparedStatement ps = getPS(Statements.FJD_PS);
- List<JobDBEntry> jobs = new ArrayList<JobDBEntry>();
- try {
- ps.setString(1, workflowId);
- ResultSet rs = ps.executeQuery();
- while (rs.next()) {
- JobDBEntry j = new JobDBEntry();
- j.setConfPath(JobFields.CONFPATH.getString(rs));
- j.setSubmitTime(JobFields.SUBMITTIME.getLong(rs));
- long finishTime = JobFields.FINISHTIME.getLong(rs);
- if (finishTime > j.getSubmitTime())
- j.setElapsedTime(finishTime - j.getSubmitTime());
- else
- j.setElapsedTime(0);
- j.setInputBytes(JobFields.INPUTBYTES.getLong(rs));
- j.setJobId(JobFields.JOBID.getString(rs));
- j.setJobName(JobFields.JOBNAME.getString(rs));
- j.setMaps(JobFields.MAPS.getInt(rs));
- j.setOutputBytes(JobFields.OUTPUTBYTES.getLong(rs));
- j.setReduces(JobFields.REDUCES.getInt(rs));
- j.setStatus(JobFields.STATUS.getString(rs));
- j.setUserName(JobFields.USERNAME.getString(rs));
- j.setWorkflowEntityName(JobFields.WORKFLOWENTITYNAME.getString(rs));
- j.setWorkflowId(JobFields.WORKFLOWID.getString(rs));
- jobs.add(j);
- }
- rs.close();
- } catch (SQLException e) {
- throw new IOException(e);
- }
- return jobs;
- }
-
- private PreparedStatement getPS(Statements statement) throws IOException {
- if (db == null)
- throw new IOException("postgres db not initialized");
-
- synchronized (preparedStatements) {
- if (!preparedStatements.containsKey(statement)) {
- try {
- preparedStatements.put(statement, db.prepareStatement(statement.getStatementString()));
- } catch (SQLException e) {
- throw new IOException(e);
- }
- }
- }
-
- return preparedStatements.get(statement);
- }
-
- @Override
- public void close() {
- if (db != null) {
- try {
- db.close();
- } catch (SQLException e) {}
- db = null;
- }
- }
-
- @Override
- protected void finalize() throws Throwable {
- close();
- }
-}
diff --git a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/model/Jobs.java b/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/model/Jobs.java
deleted file mode 100644
index 9f7c17bfe5..0000000000
--- a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/model/Jobs.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * 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.ambari.eventdb.model;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.apache.commons.lang.StringUtils;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Jobs {
- List<JobDBEntry> jobs;
-
- public static class JobDBEntry {
- public static enum JobFields {
- JOBID,
- JOBNAME,
- STATUS,
- USERNAME,
- SUBMITTIME,
- FINISHTIME,
- MAPS,
- REDUCES,
- INPUTBYTES,
- OUTPUTBYTES,
- CONFPATH,
- WORKFLOWID,
- WORKFLOWENTITYNAME;
-
- public String getString(ResultSet rs) throws SQLException {
- return rs.getString(this.toString());
- }
-
- public int getInt(ResultSet rs) throws SQLException {
- return rs.getInt(this.toString());
- }
-
- public long getLong(ResultSet rs) throws SQLException {
- return rs.getLong(this.toString());
- }
-
- public static String join() {
- String[] tmp = new String[JobFields.values().length];
- for (int i = 0; i < tmp.length; i++)
- tmp[i] = JobFields.values()[i].toString();
- return StringUtils.join(tmp, ",");
- }
- }
-
- @XmlTransient
- public static String JOB_FIELDS = JobFields.join();
-
- private String jobId;
- private String jobName;
- private String status;
- private String userName;
- private long submitTime;
- private long elapsedTime;
- private int maps;
- private int reduces;
- private long inputBytes;
- private long outputBytes;
- private String confPath;
- private String workflowId;
- private String workflowEntityName;
-
- public JobDBEntry() {
- /* Required by JAXB. */
- }
-
- public String getJobId() {
- return jobId;
- }
-
- public String getJobName() {
- return jobName;
- }
-
- public String getStatus() {
- return status;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public long getSubmitTime() {
- return submitTime;
- }
-
- public long getElapsedTime() {
- return elapsedTime;
- }
-
- public int getMaps() {
- return maps;
- }
-
- public int getReduces() {
- return reduces;
- }
-
- public long getInputBytes() {
- return inputBytes;
- }
-
- public long getOutputBytes() {
- return outputBytes;
- }
-
- public String getConfPath() {
- return confPath;
- }
-
- public String getWorkflowId() {
- return workflowId;
- }
-
- public String getWorkflowEntityName() {
- return workflowEntityName;
- }
-
- public void setJobId(String jobId) {
- this.jobId = jobId;
- }
-
- public void setJobName(String jobName) {
- this.jobName = jobName;
- }
-
- public void setStatus(String status) {
- this.status = status;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public void setSubmitTime(long submitTime) {
- this.submitTime = submitTime;
- }
-
- public void setElapsedTime(long elapsedTime) {
- this.elapsedTime = elapsedTime;
- }
-
- public void setMaps(int maps) {
- this.maps = maps;
- }
-
- public void setReduces(int reduces) {
- this.reduces = reduces;
- }
-
- public void setInputBytes(long inputBytes) {
- this.inputBytes = inputBytes;
- }
-
- public void setOutputBytes(long outputBytes) {
- this.outputBytes = outputBytes;
- }
-
- public void setConfPath(String confPath) {
- this.confPath = confPath;
- }
-
- public void setWorkflowId(String workflowId) {
- this.workflowId = workflowId;
- }
-
- public void setWorkflowEntityName(String workflowEntityName) {
- this.workflowEntityName = workflowEntityName;
- }
- }
-
- public Jobs() {}
-
- public List<JobDBEntry> getJobs() {
- return jobs;
- }
-
- public void setJobs(List<JobDBEntry> jobs) {
- this.jobs = jobs;
- }
-}
diff --git a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/model/Workflows.java b/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/model/Workflows.java
deleted file mode 100644
index 5bbce394a5..0000000000
--- a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/model/Workflows.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/**
- * 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.ambari.eventdb.model;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.apache.commons.lang.StringUtils;
-
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Workflows {
- List<WorkflowDBEntry> workflows;
-
- public static class WorkflowDBEntry {
- public static enum WorkflowFields {
- WORKFLOWID,
- WORKFLOWNAME,
- USERNAME,
- STARTTIME,
- LASTUPDATETIME,
- NUMJOBSTOTAL,
- NUMJOBSCOMPLETED,
- PARENTWORKFLOWID,
- WORKFLOWCONTEXT;
-
- public String getString(ResultSet rs) throws SQLException {
- return rs.getString(this.toString());
- }
-
- public int getInt(ResultSet rs) throws SQLException {
- return rs.getInt(this.toString());
- }
-
- public long getLong(ResultSet rs) throws SQLException {
- return rs.getLong(this.toString());
- }
-
- public static String join() {
- String[] tmp = new String[WorkflowFields.values().length];
- for (int i = 0; i < tmp.length; i++)
- tmp[i] = WorkflowFields.values()[i].toString();
- return StringUtils.join(tmp, ",");
- }
- }
-
- @XmlTransient
- public static String WORKFLOW_FIELDS = WorkflowFields.join();
-
- private String workflowId;
- private String workflowName;
- private String userName;
- private long startTime;
- private long elapsedTime;
- private int numJobsTotal;
- private int numJobsCompleted;
- private String parentWorkflowId;
- private WorkflowContext workflowContext;
-
- public WorkflowDBEntry() {
- /* Required by JAXB. */
- }
-
- public String getWorkflowId() {
- return workflowId;
- }
-
- public String getWorkflowName() {
- return workflowName;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public long getStartTime() {
- return startTime;
- }
-
- public long getElapsedTime() {
- return elapsedTime;
- }
-
- public int getNumJobsTotal() {
- return numJobsTotal;
- }
-
- public int getNumJobsCompleted() {
- return numJobsCompleted;
- }
-
- public String getParentWorkflowId() {
- return parentWorkflowId;
- }
-
- public WorkflowContext getWorkflowContext() {
- return workflowContext;
- }
-
- public void setWorkflowId(String workflowId) {
- this.workflowId = workflowId;
- }
-
- public void setWorkflowName(String workflowName) {
- this.workflowName = workflowName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- public void setStartTime(long startTime) {
- this.startTime = startTime;
- }
-
- public void setElapsedTime(long elapsedTime) {
- this.elapsedTime = elapsedTime;
- }
-
- public void setNumJobsTotal(int numJobsTotal) {
- this.numJobsTotal = numJobsTotal;
- }
-
- public void setNumJobsCompleted(int numJobsCompleted) {
- this.numJobsCompleted = numJobsCompleted;
- }
-
- public void setParentWorkflowId(String parentWorkflowId) {
- this.parentWorkflowId = parentWorkflowId;
- }
-
- public void setWorkflowContext(WorkflowContext workflowContext) {
- this.workflowContext = workflowContext;
- }
- }
-
- public Workflows() {}
-
- public List<WorkflowDBEntry> getWorkflows() {
- return workflows;
- }
-
- public void setWorkflows(List<WorkflowDBEntry> workflows) {
- this.workflows = workflows;
- }
-}
diff --git a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/webservice/JAXBContextResolver.java b/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/webservice/JAXBContextResolver.java
deleted file mode 100644
index 0f099b9d64..0000000000
--- a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/webservice/JAXBContextResolver.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.ambari.eventdb.webservice;
-
-import com.sun.jersey.api.json.JSONConfiguration;
-import com.sun.jersey.api.json.JSONJAXBContext;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.ws.rs.ext.Provider;
-import javax.ws.rs.ext.ContextResolver;
-import javax.xml.bind.JAXBContext;
-
-import org.apache.ambari.eventdb.model.Jobs;
-import org.apache.ambari.eventdb.model.WorkflowContext;
-import org.apache.ambari.eventdb.model.WorkflowDag;
-import org.apache.ambari.eventdb.model.Workflows;
-
-@Provider
-public class JAXBContextResolver implements ContextResolver<JAXBContext> {
-
- /* NOTE: Remember to add any new Model classes to this list. */
- private static final Class[] classes = {
- WorkflowContext.class,
- WorkflowDag.class,
- WorkflowDag.WorkflowDagEntry.class,
- Jobs.class,
- Jobs.JobDBEntry.class,
- Workflows.class,
- Workflows.WorkflowDBEntry.class
- };
-
- private static final Set<Class> types =
- new HashSet<Class>(Arrays.asList(classes));
-
- private static final JAXBContext context;
-
- static {
- JAXBContext tmpContext;
-
- try {
- tmpContext = new JSONJAXBContext(JSONConfiguration.natural().build(), classes);
- } catch (Exception e) {
- /* Do Nothing (with the exception). */
- tmpContext = null;
- }
-
- context = tmpContext;
- }
-
- @Override
- public JAXBContext getContext(Class<?> classType) {
- return (types.contains(classType)) ? context : null;
- }
-}
diff --git a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java b/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java
deleted file mode 100644
index 68f3044677..0000000000
--- a/contrib/ambari-log4j/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * 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.ambari.eventdb.webservice;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
-import javax.servlet.ServletContext;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.QueryParam;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-
-import org.apache.ambari.eventdb.db.PostgresConnector;
-import org.apache.ambari.eventdb.model.Jobs;
-import org.apache.ambari.eventdb.model.Jobs.JobDBEntry;
-import org.apache.ambari.eventdb.model.Workflows;
-import org.apache.ambari.eventdb.model.Workflows.WorkflowDBEntry;
-
-@Path("/json")
-public class WorkflowJsonService {
- private static final String PREFIX = "eventdb.";
- private static final String HOSTNAME = PREFIX + "db.hostname";
- private static final String DBNAME = PREFIX + "db.name";
- private static final String USERNAME = PREFIX + "db.user";
- private static final String PASSWORD = PREFIX + "db.password";
-
- private static final List<WorkflowDBEntry> EMPTY_WORKFLOWS = Collections.emptyList();
- private static final List<JobDBEntry> EMPTY_JOBS = Collections.emptyList();
-
- @Context
- ServletContext servletContext;
-
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- @Path("/workflow")
- public Workflows getWorkflows() {
- Workflows workflows = new Workflows();
- try {
- PostgresConnector conn = new PostgresConnector(servletContext.getInitParameter(HOSTNAME), servletContext.getInitParameter(DBNAME),
- servletContext.getInitParameter(USERNAME), servletContext.getInitParameter(PASSWORD));
- workflows.setWorkflows(conn.fetchWorkflows());
- conn.close();
- } catch (IOException e) {
- e.printStackTrace();
- workflows.setWorkflows(EMPTY_WORKFLOWS);
- }
- return workflows;
- }
-
- @GET
- @Produces(MediaType.APPLICATION_JSON)
- @Path("/job")
- public Jobs getJobs(@QueryParam("workflowId") String workflowId) {
- Jobs jobs = new Jobs();
- try {
- PostgresConnector conn = new PostgresConnector(servletContext.getInitParameter(HOSTNAME), servletContext.getInitParameter(DBNAME),
- servletContext.getInitParameter(USERNAME), servletContext.getInitParameter(PASSWORD));
- jobs.setJobs(conn.fetchJobDetails(workflowId));
- conn.close();
- } catch (IOException e) {
- e.printStackTrace();
- jobs.setJobs(EMPTY_JOBS);
- }
- return jobs;
- }
-}
diff --git a/contrib/ambari-log4j/src/main/java/org/apache/ambari/log4j/hadoop/mapreduce/jobhistory/MapReduceJobHistoryUpdater.java b/contrib/ambari-log4j/src/main/java/org/apache/ambari/log4j/hadoop/mapreduce/jobhistory/MapReduceJobHistoryUpdater.java
index e299538d30..309ae1ecb1 100644
--- a/contrib/ambari-log4j/src/main/java/org/apache/ambari/log4j/hadoop/mapreduce/jobhistory/MapReduceJobHistoryUpdater.java
+++ b/contrib/ambari-log4j/src/main/java/org/apache/ambari/log4j/hadoop/mapreduce/jobhistory/MapReduceJobHistoryUpdater.java
@@ -38,6 +38,9 @@ import org.apache.hadoop.mapreduce.CounterGroup;
import org.apache.hadoop.mapreduce.Counters;
import org.apache.hadoop.mapreduce.TaskType;
import org.apache.hadoop.tools.rumen.HistoryEvent;
+import org.apache.hadoop.tools.rumen.JhCounter;
+import org.apache.hadoop.tools.rumen.JhCounterGroup;
+import org.apache.hadoop.tools.rumen.JhCounters;
import org.apache.hadoop.tools.rumen.JobFinishedEvent;
import org.apache.hadoop.tools.rumen.JobInfoChangeEvent;
import org.apache.hadoop.tools.rumen.JobInitedEvent;
@@ -417,6 +420,8 @@ public class MapReduceJobHistoryUpdater implements LogStoreUpdateProvider {
"taskType = ?, " +
"mapFinishTime = ?, " +
"finishTime = ?, " +
+ "inputBytes = ?, " +
+ "outputBytes = ?, " +
"status = ?, " +
"taskTracker = ? " +
" WHERE " +
@@ -438,6 +443,8 @@ public class MapReduceJobHistoryUpdater implements LogStoreUpdateProvider {
"shuffleFinishTime = ?, " +
"sortFinishTime = ?, " +
"finishTime = ?, " +
+ "inputBytes = ?, " +
+ "outputBytes = ?, " +
"status = ?, " +
"taskTracker = ? " +
" WHERE " +
@@ -568,7 +575,11 @@ public class MapReduceJobHistoryUpdater implements LogStoreUpdateProvider {
}
dag.addEntry(dagEntry);
}
-
+ if (dag.getEntries().isEmpty()) {
+ WorkflowDagEntry wfDagEntry = new WorkflowDagEntry();
+ wfDagEntry.setSource(workflowNodeName);
+ dag.addEntry(wfDagEntry);
+ }
context.setWorkflowDag(dag);
return context;
}
@@ -896,6 +907,8 @@ public class MapReduceJobHistoryUpdater implements LogStoreUpdateProvider {
historyEvent.getTaskType());
return;
}
+
+ long[] ioBytes = getInputOutputBytes(historyEvent.getCounters());
try {
entityPS.setString(1,
@@ -904,9 +917,11 @@ public class MapReduceJobHistoryUpdater implements LogStoreUpdateProvider {
entityPS.setString(3, historyEvent.getTaskType().toString());
entityPS.setLong(4, historyEvent.getMapFinishTime());
entityPS.setLong(5, historyEvent.getFinishTime());
- entityPS.setString(6, historyEvent.getTaskStatus());
- entityPS.setString(7, historyEvent.getHostname());
- entityPS.setString(8, historyEvent.getAttemptId().toString());
+ entityPS.setLong(6, ioBytes[0]);
+ entityPS.setLong(7, ioBytes[1]);
+ entityPS.setString(8, historyEvent.getTaskStatus());
+ entityPS.setString(9, historyEvent.getHostname());
+ entityPS.setString(10, historyEvent.getAttemptId().toString());
entityPS.executeUpdate();
} catch (SQLException sqle) {
LOG.info("Failed to store " + historyEvent.getEventType() +
@@ -924,6 +939,8 @@ public class MapReduceJobHistoryUpdater implements LogStoreUpdateProvider {
historyEvent.getTaskType());
return;
}
+
+ long[] ioBytes = getInputOutputBytes(historyEvent.getCounters());
try {
entityPS.setString(1,
@@ -933,9 +950,11 @@ public class MapReduceJobHistoryUpdater implements LogStoreUpdateProvider {
entityPS.setLong(4, historyEvent.getShuffleFinishTime());
entityPS.setLong(5, historyEvent.getSortFinishTime());
entityPS.setLong(6, historyEvent.getFinishTime());
- entityPS.setString(7, historyEvent.getTaskStatus());
- entityPS.setString(8, historyEvent.getHostname());
- entityPS.setString(9, historyEvent.getAttemptId().toString());
+ entityPS.setLong(7, ioBytes[0]);
+ entityPS.setLong(8, ioBytes[1]);
+ entityPS.setString(9, historyEvent.getTaskStatus());
+ entityPS.setString(10, historyEvent.getHostname());
+ entityPS.setString(11, historyEvent.getAttemptId().toString());
entityPS.executeUpdate();
} catch (SQLException sqle) {
LOG.info("Failed to store " + historyEvent.getEventType() +
@@ -944,6 +963,26 @@ public class MapReduceJobHistoryUpdater implements LogStoreUpdateProvider {
}
}
+ public static long[] getInputOutputBytes(JhCounters counters) {
+ long inputBytes = 0;
+ long outputBytes = 0;
+ if (counters != null) {
+ for (JhCounterGroup counterGroup : counters.groups) {
+ if (counterGroup.name.equals("FileSystemCounters")) {
+ for (JhCounter counter : counterGroup.counts) {
+ if (counter.name.equals("HDFS_BYTES_READ") ||
+ counter.name.equals("FILE_BYTES_READ"))
+ inputBytes += counter.value;
+ else if (counter.name.equals("HDFS_BYTES_WRITTEN") ||
+ counter.name.equals("FILE_BYTES_WRITTEN"))
+ outputBytes += counter.value;
+ }
+ }
+ }
+ }
+ return new long[]{inputBytes, outputBytes};
+ }
+
@Override
public void update(LoggingEvent originalEvent, Object parsedEvent)
diff --git a/contrib/ambari-log4j/src/main/resources/ambari.schema b/contrib/ambari-log4j/src/main/resources/ambari.schema
index 75f6a72c78..9419718b5e 100644
--- a/contrib/ambari-log4j/src/main/resources/ambari.schema
+++ b/contrib/ambari-log4j/src/main/resources/ambari.schema
@@ -36,6 +36,7 @@ CREATE TABLE taskAttempt (
mapFinishTime BIGINT, shuffleFinishTime BIGINT, sortFinishTime BIGINT,
locality TEXT, avataar TEXT,
status TEXT, error TEXT, counters TEXT,
+ inputBytes BIGINT, outputBytes BIGINT,
PRIMARY KEY(taskAttemptId),
FOREIGN KEY(jobId) REFERENCES job(jobId),
FOREIGN KEY(taskId) REFERENCES task(taskId)
diff --git a/contrib/ambari-log4j/src/main/webapp/WEB-INF/web.xml b/contrib/ambari-log4j/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 3a7516d83f..0000000000
--- a/contrib/ambari-log4j/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
- version="2.5">
-
- <context-param>
- <param-name>eventdb.db.hostname</param-name>
- <param-value>localhost</param-value>
- </context-param>
- <context-param>
- <param-name>eventdb.db.name</param-name>
- <param-value>ambari</param-value>
- </context-param>
- <context-param>
- <param-name>eventdb.db.user</param-name>
- <param-value>dbuser</param-value>
- </context-param>
- <context-param>
- <param-name>eventdb.db.password</param-name>
- <param-value></param-value>
- </context-param>
-
- <servlet>
- <servlet-name>Workflow JSON Servlet</servlet-name>
- <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
- <init-param>
- <param-name>com.sun.jersey.config.property.packages</param-name>
- <param-value>org.apache.ambari.eventdb.webservice</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- Add jsp files here
- <servlet>
- <servlet-name></servlet-name>
- <jsp-file></jsp-file>
- </servlet>
- -->
-
- <servlet-mapping>
- <servlet-name>Workflow JSON Servlet</servlet-name>
- <url-pattern>/wf/*</url-pattern>
- </servlet-mapping>
-
-</web-app>