ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject ambari git commit: AMBARI-19219 - Add a Maven Target for ambari-server Which Updates the Configuration Markdown (jonathanhurley)
Date Fri, 16 Dec 2016 19:21:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 7df6bba44 -> ae3a53905


AMBARI-19219 - Add a Maven Target for ambari-server Which Updates the Configuration Markdown
(jonathanhurley)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ae3a5390
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ae3a5390
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ae3a5390

Branch: refs/heads/branch-2.5
Commit: ae3a539054fc20abbb223542fd24c1fea1cb2f85
Parents: 7df6bba
Author: Jonathan Hurley <jhurley@hortonworks.com>
Authored: Thu Dec 15 15:56:55 2016 -0500
Committer: Jonathan Hurley <jhurley@hortonworks.com>
Committed: Fri Dec 16 14:20:55 2016 -0500

----------------------------------------------------------------------
 ambari-server/pom.xml                           | 21 +++++++
 .../server/configuration/Configuration.java     | 16 ++++-
 .../server/configuration/index_template.md      | 63 --------------------
 .../server/configuration/index_template.md      | 63 ++++++++++++++++++++
 4 files changed, 97 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ae3a5390/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index fcb6fcd..ade38d3 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -692,6 +692,27 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>exec-maven-plugin</artifactId>
+        <version>1.2.1</version>
+        <executions>
+          <execution>
+            <id>configuration-markdown</id>
+            <phase>site</phase>
+            <goals>
+              <goal>java</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <mainClass>org.apache.ambari.server.configuration.Configuration</mainClass>
+          <arguments>
+            <argument>-output</argument>
+            <argument>${basedir}/../ambari-server/docs/configuration/index.md</argument>
+          </arguments>
+        </configuration>
+      </plugin>
     </plugins>
     <resources>
       <resource>

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae3a5390/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 792c369..43fff0b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -109,8 +109,17 @@ import java.util.concurrent.TimeUnit;
  * href=https://en.wikipedia.org/wiki/Markdown>Markdown</a> of all of the
  * properties, along with their default values and descriptions. This should be
  * done for every release so that the documentation of the configuration
- * properties can be kept current. The {@code index_template.md} file is used to generate
- * the markdown.
+ * properties can be kept current. The {@code index_template.md} file is used to
+ * generate the markdown.
+ * <p/>
+ * The markdown can also be generated by running the {@code site} phase in maven
+ * or by running the {@code exec:java} goal directly:
+ *
+ * <pre>
+ * mvn site
+ * mvn exec:java
+ * mvn exec:java@configuration-markdown (on maven 3.3.1 and later)
+ * </pre>
  */
 @Singleton
 public class Configuration {
@@ -5292,7 +5301,8 @@ public class Configuration {
 
       File file = new File(outputFile);
       FileUtils.writeStringToFile(file, markdown);
-      System.out.print("Successfully created " + outputFile);
+      System.out.println("Successfully created " + outputFile);
+      LOG.info("Successfully created {}", outputFile);
     } finally {
       IOUtils.closeQuietly(inputStream);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae3a5390/ambari-server/src/main/java/org/apache/ambari/server/configuration/index_template.md
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/index_template.md
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/index_template.md
deleted file mode 100644
index 5c52013..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/index_template.md
+++ /dev/null
@@ -1,63 +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.
--->
-
-Ambari Server Configuration
----
-- [Introduction](#introduction)
-- [Configuration Properties](#configuration-properties)
-- [Baseline Values](#baseline-values)
-- [Database And Persistence](#db-persistence)
-
-<a name="introduction"></a>
-## Introduction
-Ambari Server is configured using a flat text properties file. The file is read once when
starting Ambari. Any changes made to the properties file are only reflected after restarting
Ambari. 
-
-```
-/etc/ambari-server/conf/ambari.properties
-```
-
-<a name="configuration-properties"></a>
-## Configuration Properties
-The following are the properties which can be used to configure Ambari. 
-
-$configuration-properties
-
-<a name="baseline-values"></a>
-## Baseline Values
-As the size of a cluster grows, some of the default property values may no longer be sufficient.
The below tables offer recommendations on the values of some configuration properties based
on the size and usage of the cluster.
-
-$baseline-values
-
-<a name="db-persistence"></a>
-## Database And Persistence
-In addition to the static database connection properties, it's possible to supply custom
properties for both EclipseLink and the database driver through `ambari.properties`. 
-
-### Database Driver
-Using the `server.jdbc.properties.` prefix, it's possible to supply specific properties to
the database driver being used by Ambari. These properties do not affect JPA or any of the
persistence-unit operations. They are solely to govern the behavior of the database driver.

-
-```
-server.jdbc.properties.lockTimeout=15000
-server.jdbc.properties.loginTimeout=15000
-```
-
-### Persistence Unit
-EclipseLink properties can also be configured using a prefix of `server.persistence.properties.`.
The EclipseLink properties should be defined in their entirety with the prefix prepended in
front of them.
-
-```
-server.persistence.properties.eclipselink.jdbc.batch-writing.size=25
-server.persistence.properties.eclipselink.profiler=QueryMonitor
-```
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/ae3a5390/ambari-server/src/main/resources/org/apache/ambari/server/configuration/index_template.md
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/org/apache/ambari/server/configuration/index_template.md
b/ambari-server/src/main/resources/org/apache/ambari/server/configuration/index_template.md
new file mode 100644
index 0000000..5c52013
--- /dev/null
+++ b/ambari-server/src/main/resources/org/apache/ambari/server/configuration/index_template.md
@@ -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.
+-->
+
+Ambari Server Configuration
+---
+- [Introduction](#introduction)
+- [Configuration Properties](#configuration-properties)
+- [Baseline Values](#baseline-values)
+- [Database And Persistence](#db-persistence)
+
+<a name="introduction"></a>
+## Introduction
+Ambari Server is configured using a flat text properties file. The file is read once when
starting Ambari. Any changes made to the properties file are only reflected after restarting
Ambari. 
+
+```
+/etc/ambari-server/conf/ambari.properties
+```
+
+<a name="configuration-properties"></a>
+## Configuration Properties
+The following are the properties which can be used to configure Ambari. 
+
+$configuration-properties
+
+<a name="baseline-values"></a>
+## Baseline Values
+As the size of a cluster grows, some of the default property values may no longer be sufficient.
The below tables offer recommendations on the values of some configuration properties based
on the size and usage of the cluster.
+
+$baseline-values
+
+<a name="db-persistence"></a>
+## Database And Persistence
+In addition to the static database connection properties, it's possible to supply custom
properties for both EclipseLink and the database driver through `ambari.properties`. 
+
+### Database Driver
+Using the `server.jdbc.properties.` prefix, it's possible to supply specific properties to
the database driver being used by Ambari. These properties do not affect JPA or any of the
persistence-unit operations. They are solely to govern the behavior of the database driver.

+
+```
+server.jdbc.properties.lockTimeout=15000
+server.jdbc.properties.loginTimeout=15000
+```
+
+### Persistence Unit
+EclipseLink properties can also be configured using a prefix of `server.persistence.properties.`.
The EclipseLink properties should be defined in their entirety with the prefix prepended in
front of them.
+
+```
+server.persistence.properties.eclipselink.jdbc.batch-writing.size=25
+server.persistence.properties.eclipselink.profiler=QueryMonitor
+```
\ No newline at end of file


Mime
View raw message