Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tez-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@
<module>tez-tfile-parser</module>
</modules>
</profile>
<profile>
<id>jdk8-16</id>
<activation>
<jdk>[8,16]</jdk>
</activation>
<modules>
<module>tez-javadoc-tools-base-jdk8</module>
</modules>
</profile>
<profile>
<id>jdk17plus</id>
<activation>
<!-- JDK9 starts strong encapsulation of Java internals, JDK17 removes/hides those -->
<jdk>[17,)</jdk>
</activation>
<modules>
<module>tez-javadoc-tools-base</module>
</modules>
</profile>
</profiles>

</project>
22 changes: 22 additions & 0 deletions tez-tools/tez-javadoc-tools-base-jdk8/findbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
Licensed 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. See accompanying LICENSE file.
-->
<FindBugsFilter>

<Match>
<Class name="org.apache.tez.tools.javadoc.model.ConfigProperty"/>
<Field name="validValues"/>
<Bug pattern="UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD"/>
</Match>

</FindBugsFilter>
106 changes: 106 additions & 0 deletions tez-tools/tez-javadoc-tools-base-jdk8/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed 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. See accompanying LICENSE file.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.tez</groupId>
<artifactId>tez-tools</artifactId>
<version>0.10.3-SNAPSHOT</version>
</parent>
<artifactId>tez-javadoc-tools-base-jdk8</artifactId>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tez</groupId>
<artifactId>tez-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-annotations</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>platform-macosx</id>
<activation>
<file>
<exists>${java.home}/../Classes/classes.jar</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../Classes/classes.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>other-os</id>
<activation>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>


<build>
<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<excludePackageNames>org.apache.tez.tools.javadoc.doclet</excludePackageNames>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* 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
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
Expand All @@ -31,14 +31,8 @@
import org.apache.tez.tools.javadoc.util.HtmlWriter;
import org.apache.tez.tools.javadoc.util.XmlWriter;

import com.sun.javadoc.AnnotationDesc;
import com.sun.javadoc.AnnotationDesc.ElementValuePair;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.DocErrorReporter;
import com.sun.javadoc.FieldDoc;
import com.sun.javadoc.LanguageVersion;
import com.sun.javadoc.RootDoc;
import com.sun.tools.doclets.standard.Standard;
import java.io.IOException;
import java.util.Map;

public final class ConfigStandardDoclet {

Expand Down Expand Up @@ -194,40 +188,34 @@ private static void processDoc(ClassDoc doc) {
}
}
}
}

configProperty.description = field.commentText();

}
HtmlWriter writer = new HtmlWriter();
try {
writer.write(config);
} catch (IOException e) {
throw new RuntimeException(e);
}

HtmlWriter writer = new HtmlWriter();
try {
writer.write(config);
} catch (IOException e) {
throw new RuntimeException(e);
}
XmlWriter xmlWriter = new XmlWriter();
try {
xmlWriter.write(config);
} catch (IOException e) {
throw new RuntimeException(e);
}
}

XmlWriter xmlWriter = new XmlWriter();
try {
xmlWriter.write(config);
} catch (IOException e) {
throw new RuntimeException(e);
}
private static String stripQuotes (String s){
if (s.charAt(0) == '"' && s.charAt(s.length() - 1) == '"') {
return s.substring(1, s.length() - 1);
}
return s;
}

}
public static int optionLength (String option){
return Standard.optionLength(option);
}

private static String stripQuotes(String s) {
if (s.charAt(0) == '"' && s.charAt(s.length()-1) == '"') {
return s.substring(1, s.length()-1);
public static boolean validOptions (String options[][],DocErrorReporter reporter){
return true;
}
}
return s;
}

public static int optionLength(String option) {
return Standard.optionLength(option);
}

public static boolean validOptions(String options[][], DocErrorReporter reporter) {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,17 @@

public class Config {

public final String templateName;
public final String configName;
public Map<String, ConfigProperty> configProperties;
public final String templateName;
public final String configName;
public Map<String, ConfigProperty> configProperties;

public Config(String configName, String templateName) {
this.configName = configName;
this.templateName = templateName;
this.configProperties = new TreeMap<String, ConfigProperty>();
}

public Config() {
this(null, null);
}
public Config(String configName, String templateName) {
this.configName = configName;
this.templateName = templateName;
this.configProperties = new TreeMap<String, ConfigProperty>();
}

public Config() {
this(null, null);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* 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.tez.tools.javadoc.model;

public class ConfigProperty {

public String propertyName;
public String defaultValue;
public String description;
public String type = "string";
public boolean isPrivate = false;
public boolean isUnstable = false;
public boolean isEvolving = false;
public boolean isValidConfigProp = false;
public String[] validValues;
public String inferredType;

@Override
public String toString() {
return "name=" + propertyName
+ ", defaultValue=" + defaultValue
+ ", description=" + description
+ ", type=" + type
+ ", inferredType=" + inferredType
+ ", private=" + isPrivate
+ ", validValues=" + (validValues == null ? "null" : validValues)
+ ", isConfigProp=" + isValidConfigProp;
}
}
Loading