From 6dd53538995f232e31285bb4a02efc5f53c932fb Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 05:42:35 +0000 Subject: [PATCH 01/24] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- accumulo.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accumulo.spec b/accumulo.spec index ba2547c..1f76979 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -6,7 +6,7 @@ Name: accumulo Version: 1.6.6 -Release: 13%{?dist} +Release: 14%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 Group: Development/Libraries @@ -517,6 +517,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.6.6-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Tue Dec 06 2016 Christopher Tubbs - 1.6.6-13 - Fix missing protobuf-java and hadoop config classpath bug, and systemd exit code problems From 85362cc47ccd1e1988985aff9533e1f6d79d057f Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Mon, 6 Mar 2017 12:24:03 -0500 Subject: [PATCH 02/24] Updates for 1.8.1 --- .gitignore | 1 + accumulo.spec | 66 ++++++++++++++++++++++-------------- default-conf.patch | 41 ++++++++-------------- disabled-tests.patch | 12 +++---- guava.patch | 52 ++++++++++++++++++++++++++++ jline-shell-workaround.patch | 34 ++++++++++++++++--- native-code.patch | 6 ++-- sources | 2 +- thrift-0.10.0.patch | 26 ++++++++++++++ 9 files changed, 175 insertions(+), 65 deletions(-) create mode 100644 guava.patch create mode 100644 thrift-0.10.0.patch diff --git a/.gitignore b/.gitignore index 87ee19c..0de7351 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /accumulo-1.6.2-src.tar.gz /accumulo-1.6.4-src.tar.gz /accumulo-1.6.6-src.tar.gz +/accumulo-1.8.1-src.tar.gz diff --git a/accumulo.spec b/accumulo.spec index 1f76979..d09ff38 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -5,8 +5,8 @@ %global main_class org.apache.%{name}.start.Main Name: accumulo -Version: 1.6.6 -Release: 14%{?dist} +Version: 1.8.1 +Release: 1%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 Group: Development/Libraries @@ -23,28 +23,18 @@ Source5: %{name}-monitor.service # Java configuration file for Fedora Source6: %{name}.conf -# Use Jetty version 9 instead of 8 -Patch0: jetty9.patch -# Use current version of commons-configuration -Patch1: commons-configuration.patch -# Use current version of commons-math -Patch2: commons-math.patch # Apply Fedora JNI conventions Patch3: native-code.patch -# Disable broken tests -Patch4: disabled-tests.patch # Patch upstream-provided example configuration for Fedora Patch5: default-conf.patch -%if 0%{?fedora} > 24 -# Patch upstream ACCUMULO-3470 (update to commons-vfs 2.1) -Patch6: ACCUMULO-3470.patch -%endif -# Fix for Shell erroneously reading accumulo-site.xml -Patch7: shell-not-read-conf.patch # Fix for updating to flot 0.8 from 0.7 (adds flot.time) Patch8: flot8.patch # Workaround for https://github.com/jline/jline2/issues/205 Patch9: jline-shell-workaround.patch +# Fix version number in thrift script +Patch10: thrift-0.10.0.patch +# Fix differences with guava version +Patch11: guava.patch BuildRequires: apache-commons-cli BuildRequires: apache-commons-codec @@ -59,6 +49,7 @@ BuildRequires: apache-commons-vfs >= 2.1-7 %else BuildRequires: apache-commons-vfs < 2.1 %endif +BuildRequires: auto-service BuildRequires: beust-jcommander BuildRequires: bouncycastle BuildRequires: exec-maven-plugin @@ -83,6 +74,7 @@ BuildRequires: powermock-core BuildRequires: powermock-junit4 BuildRequires: slf4j BuildRequires: systemd-units +BuildRequires: thrift BuildRequires: zookeeper-java Requires: %{name}-core = %{version}-%{release} @@ -268,6 +260,22 @@ modify key/value pairs at various points in the data management process. This package provides native code for %{longproj}'s TServer. +%package shell +Summary: Shell for %{longproj} +License: ASL 2.0 +Group: Development/Libraries +Requires: %{name}-core = %{version}-%{release} +Requires: %{name}-tserver = %{version}-%{release} + +%description shell + %{longproj} is a sorted, distributed key/value store based on Google's +BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It +features a few novel improvements on the BigTable design in the form of +cell-level access labels and a server-side programming mechanism that can +modify key/value pairs at various points in the data management process. + +This package provides the shell service for %{longproj}. + %prep %autosetup -p1 # Remove flot and jquery bundling from upstream tarball @@ -276,11 +284,8 @@ rm -rf server/monitor/src/main/resources/web/flot/ # Update dependency versions %pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='jline']/pom:version" "2.10" %pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='zookeeper']/pom:version" "3.4.5" -%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='libthrift']/pom:version" "0.9.1" +%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='libthrift']/pom:version" "0.10.0" %pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='log4j']/pom:version" "1.2.17" -%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='commons-math']/pom:version" "3.2" -%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='commons-math']/pom:artifactId" "commons-math3" -%pom_xpath_set "pom:project/pom:dependencies/pom:dependency[pom:artifactId='commons-math']/pom:artifactId" "commons-math3" core %pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='bcprov-jdk15on']/pom:artifactId" "bcprov-jdk16" # Remove enforcer animal-sniffer rule @@ -295,6 +300,7 @@ rm -rf server/monitor/src/main/resources/web/flot/ %pom_disable_module assemble # Mini isn't needed %pom_disable_module minicluster +%pom_disable_module iterator-test-harness # Remove unneeded plugins %pom_remove_plugin :maven-checkstyle-plugin @@ -306,6 +312,7 @@ rm -rf server/monitor/src/main/resources/web/flot/ %pom_remove_plugin :findbugs-maven-plugin %pom_remove_plugin :maven-java-formatter-plugin %pom_remove_plugin :modernizer-maven-plugin +%pom_remove_plugin :apilyzer-maven-plugin core # Mini isn't needed #%%mvn_package ":%%{name}-minicluster" __noinstall @@ -317,6 +324,7 @@ rm -rf server/monitor/src/main/resources/web/flot/ %mvn_package ":%{name}-server-base" server-base %mvn_package ":%{name}-tracer" tracer %mvn_package ":%{name}-tserver" tserver +%mvn_package ":%{name}-shell" shell # build native, but skip install; JNI *.so is copied manually %mvn_package ":%{name}-native" __noinstall @@ -328,7 +336,7 @@ rm -rf server/monitor/src/main/resources/web/flot/ # especially in the start jar. These should be enabled when possible. # ITs are skipped, because they time out frequently and take too many resources # to run reliably. Failures do not reliably indicate meaningful issues. -%mvn_build -j -- -DforkCount=1C -DskipTests -DskipITs +%mvn_build -j -- -Pthrift -DforkCount=1C -DskipTests -DskipITs %install %mvn_install @@ -353,7 +361,7 @@ cp %{buildroot}%{_sysconfdir}/%{name}/log4j.properties %{buildroot}%{_sysconfdir cp %{buildroot}%{_sysconfdir}/%{name}/log4j.properties %{buildroot}%{_sysconfdir}/%{name}/monitor_logger.properties # main launcher -%jpackage_script %{main_class} "" "" %{name}:%{name}/%{name}-tserver:jetty:servlet:avro/avro:apache-commons-io:apache-commons-cli:apache-commons-codec:apache-commons-collections:apache-commons-configuration:apache-commons-lang:apache-commons-logging:apache-commons-math:apache-commons-vfs:beust-jcommander:google-gson:guava:hadoop/hadoop-auth:hadoop/hadoop-common:hadoop/hadoop-hdfs:jansi/jansi:jline/jline:libthrift:log4j-1.2.17:slf4j/slf4j-api:slf4j/slf4j-log4j12:zookeeper/zookeeper:protobuf-java %{name} true +%jpackage_script %{main_class} "" "" %{name}:%{name}/%{name}-tserver:jetty:servlet:avro/avro:apache-commons-io:apache-commons-cli:apache-commons-codec:apache-commons-collections:apache-commons-configuration:apache-commons-lang:apache-commons-logging:apache-commons-math:apache-commons-vfs:beust-jcommander:google-gson:guava:hadoop/hadoop-auth:hadoop/hadoop-common:hadoop/hadoop-hdfs:jansi/jansi:jline/jline:libthrift:log4j-1.2.17:slf4j/slf4j-api:slf4j/slf4j-log4j12:zookeeper/zookeeper:protobuf-java:jackson/jackson-mapper-asl:jackson/jackson-core-asl:htrace/htrace-core %{name} true # fixup the generated jpackage script sed -i -e 's/^#!\/bin\/sh$/#!\/usr\/bin\/bash/' %{buildroot}%{_bindir}/%{name} # ensure the java configuration options know which service is being called @@ -404,11 +412,11 @@ install -d -m 755 %{buildroot}%{_javaconfdir} install -p -m 755 %{SOURCE6} %{buildroot}%{_javaconfdir}/%{name}.conf %files +%doc LICENSE +%doc README.md +%doc NOTICE %files core -f .mfiles-core -%doc LICENSE -%doc README -%doc NOTICE %dir %{_javadir}/%{name} %dir %{_mavenpomdir}/%{name} %dir %{_datadir}/%{name} @@ -434,6 +442,9 @@ install -p -m 755 %{SOURCE6} %{buildroot}%{_javaconfdir}/%{name}.conf %attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/generic_logger.properties %attr(0644, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/log4j.properties %attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/monitor_logger.properties +%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/client.conf +%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/hadoop-metrics2-accumulo.properties + %files server-base -f .mfiles-server-base %{_bindir}/%{name}-init @@ -463,6 +474,8 @@ install -p -m 755 %{SOURCE6} %{buildroot}%{_javaconfdir}/%{name}.conf %files examples -f .mfiles-examples +%files shell -f .mfiles-shell + %files native %dir %{_libdir}/%{name} %{_libdir}/%{name}/lib%{name}.so @@ -517,6 +530,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Wed Mar 15 2017 Mike Miller - 1.8.1-1 +- Update to 1.8.1 + * Fri Feb 10 2017 Fedora Release Engineering - 1.6.6-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/default-conf.patch b/default-conf.patch index 1bc7f28..0c3c4c1 100644 --- a/default-conf.patch +++ b/default-conf.patch @@ -16,32 +16,16 @@ diff --git a/assemble/conf/templates/accumulo-site.xml b/assemble/conf/templates index 7fe3fe4..a9e29e1 100644 --- a/assemble/conf/templates/accumulo-site.xml +++ b/assemble/conf/templates/accumulo-site.xml -@@ -22,18 +22,15 @@ - you are simply testing at your workstation, you will most definitely need to change the three entries below. --> +@@ -23,7 +23,7 @@ -- instance.zookeeper.host -- localhost:2181 -- comma separated list of zookeeper servers -+ instance.volumes + instance.volumes +- + file:///tmp/accumulo -+ comma separated list of dfs URIs + comma separated list of URIs for volumes. example: hdfs://localhost:9000/accumulo - -- logger.dir.walog -- walogs -- The property only needs to be set if upgrading from 1.4 which used to store write-ahead logs on the local -- filesystem. In 1.5 write-ahead logs are stored in DFS. When 1.5 is started for the first time it will copy any 1.4 -- write ahead logs into DFS. It is possible to specify a comma-separated list of directories. -- -+ instance.zookeeper.host -+ localhost:2181 -+ comma separated list of zookeeper servers - - - -@@ -89,49 +86,13 @@ +@@ -123,54 +123,13 @@ ${mvnProjBaseDir} general.classpaths @@ -83,18 +67,23 @@ index 7fe3fe4..a9e29e1 100644 - /usr/hdp/current/hadoop-yarn-client/lib/jersey.*.jar, - /usr/hdp/current/hive-client/lib/hive-accumulo-handler.jar - -- -- $HADOOP_PREFIX/[^.].*.jar, -- $HADOOP_PREFIX/lib/(?!slf4j)[^.].*.jar, -- +- +- /usr/iop/current/hadoop-client/[^.].*.jar, +- /usr/iop/current/hadoop-client/lib/(?!slf4j)[^.].*.jar, +- /usr/iop/current/hadoop-hdfs-client/[^.].*.jar, +- /usr/iop/current/hadoop-mapreduce-client/[^.].*.jar, +- /usr/iop/current/hadoop-yarn-client/[^.].*.jar, +- /usr/iop/current/hadoop-yarn-client/lib/jersey.*.jar, +- /usr/iop/current/hive-client/lib/hive-accumulo-handler.jar +- - + /etc/accumulo/lib,/etc/hadoop Classpaths that accumulo checks for updates and class files. -+ + + general.dynamic.classpaths + /etc/accumulo/lib/ext + Classpaths that accumulo checks for updates and class files to dynamically load. + ++ diff --git a/disabled-tests.patch b/disabled-tests.patch index fe25c8f..58c8559 100644 --- a/disabled-tests.patch +++ b/disabled-tests.patch @@ -1,7 +1,7 @@ -diff --git a/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java b/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java +diff --git a/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java b/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java index 0453beb..84e4ad9 100644 ---- a/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java -+++ b/core/src/test/java/org/apache/accumulo/core/util/shell/ShellSetInstanceTest.java +--- a/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java ++++ b/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java @@ -53,6 +53,7 @@ import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -18,10 +18,10 @@ index 0453beb..84e4ad9 100644 public class ShellSetInstanceTest { public static class TestOutputStream extends OutputStream { StringBuilder sb = new StringBuilder(); -diff --git a/core/src/test/java/org/apache/accumulo/core/util/shell/commands/HistoryCommandTest.java b/core/src/test/java/org/apache/accumulo/core/util/shell/commands/HistoryCommandTest.java +diff --git a/shell/src/test/java/org/apache/accumulo/shell/commands/HistoryCommandTest.java b/shell/src/test/java/org/apache/accumulo/shell/commands/HistoryCommandTest.java index 9b98e4a..696a090 100644 ---- a/core/src/test/java/org/apache/accumulo/core/util/shell/commands/HistoryCommandTest.java -+++ b/core/src/test/java/org/apache/accumulo/core/util/shell/commands/HistoryCommandTest.java +--- a/shell/src/test/java/org/apache/accumulo/shell/commands/HistoryCommandTest.java ++++ b/shell/src/test/java/org/apache/accumulo/shell/commands/HistoryCommandTest.java @@ -33,6 +33,7 @@ import org.apache.accumulo.core.util.shell.Shell; import org.apache.commons.cli.CommandLine; import org.junit.Assume; diff --git a/guava.patch b/guava.patch new file mode 100644 index 0000000..df26956 --- /dev/null +++ b/guava.patch @@ -0,0 +1,52 @@ +diff --git a/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java b/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java +index d243dfe..35a18e2 100644 +--- a/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java ++++ b/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java +@@ -96,7 +96,7 @@ public class DataoutputHasher implements DataOutput { + + @Override + public void writeChars(String s) throws IOException { +- hasher.putString(s); ++ hasher.putString(s, StandardCharsets.UTF_8); + + } + +diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java +index 0c09396..c95f375 100644 +--- a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java ++++ b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java +@@ -84,7 +84,7 @@ public class CloseWriteAheadLogReferences implements Runnable { + public void run() { + // As long as we depend on a newer Guava than Hadoop uses, we have to make sure we're compatible with + // what the version they bundle uses. +- Stopwatch sw = new Stopwatch(); ++ Stopwatch sw = Stopwatch.createUnstarted(); + + Connector conn; + try { +diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java b/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java +index e286371..ef082b9 100644 +--- a/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java ++++ b/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java +@@ -83,7 +83,7 @@ public class RemoveCompleteReplicationRecords implements Runnable { + WorkSection.limit(bs); + bs.addScanIterator(cfg); + +- Stopwatch sw = new Stopwatch(); ++ Stopwatch sw = Stopwatch.createUnstarted(); + long recordsRemoved = 0; + try { + sw.start(); +diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java +index 340a58e..b0ef0a7 100644 +--- a/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java ++++ b/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java +@@ -75,7 +75,7 @@ public class ScannerIT extends AccumuloClusterHarness { + s.setBatchSize(1); + s.setRange(new Range()); + +- Stopwatch sw = new Stopwatch(); ++ Stopwatch sw = Stopwatch.createUnstarted(); + Iterator> iterator = s.iterator(); + + sw.start(); diff --git a/jline-shell-workaround.patch b/jline-shell-workaround.patch index 52015f7..b9e3241 100644 --- a/jline-shell-workaround.patch +++ b/jline-shell-workaround.patch @@ -1,7 +1,33 @@ -diff --git a/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java b/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java +diff --git a/shell/src/main/java/org/apache/accumulo/shell/Shell.java b/shell/src/main/java/org/apache/accumulo/shell/Shell.java index 9231c78..0336a67 100644 ---- a/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java -+++ b/core/src/main/java/org/apache/accumulo/core/util/shell/Shell.java +--- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java ++++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java +@@ -228,6 +228,7 @@ public class Shell extends ShellOptions implements KeywordExecutable { + private long lastUserActivity = System.nanoTime(); + private boolean logErrorsToConsole = false; + private boolean masking = false; ++ private PrintWriter writer = null; + + { + // set the JLine output encoding to some reasonable default if it isn't already set +@@ -250,6 +251,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { + public Shell(ConsoleReader reader) { + super(); + this.reader = reader; ++ this.writer = new PrintWriter(new OutputStreamWriter(System.out, Charset.forName(System.getProperty("jline.WindowsTerminal.output.encoding", ++System.getProperty("file.encoding"))))); + } + + /** +@@ -262,6 +265,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { + public boolean config(String... args) throws IOException { + if (this.reader == null) + this.reader = new ConsoleReader(); ++ if (this.writer == null) ++ this.writer = new PrintWriter(new OutputStreamWriter(System.out, Charset.forName(System.getProperty("jline.WindowsTerminal.output.encoding", System.getProperty("file.encoding"))))); + ShellOptionsJC options = new ShellOptionsJC(); + JCommander jc = new JCommander(); + @@ -646,9 +646,10 @@ public class Shell extends ShellOptions { } @@ -13,7 +39,7 @@ index 9231c78..0336a67 100644 + writer.flush(); reader.flush(); } - + @@ -676,7 +677,9 @@ public class Shell extends ShellOptions { } } diff --git a/native-code.patch b/native-code.patch index d6eea5d..70c7140 100644 --- a/native-code.patch +++ b/native-code.patch @@ -15,12 +15,12 @@ diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap. index f728a9b..4a056f0 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java -@@ -62,7 +62,7 @@ public class NativeMap implements Iterable> { +@@ -69,7 +69,7 @@ public class NativeMap implements Iterable> { // Load native library static { // Check standard directories -- List directories = new ArrayList(Arrays.asList(new File[] {new File("/usr/lib64"), new File("/usr/lib")})); -+ List directories = new ArrayList(Arrays.asList(new File[] {new File("/usr/lib64/accumulo"), new File("/usr/lib/accumulo")})); +- List directories = new ArrayList<>(Arrays.asList(new File[] {new File("/usr/lib64"), new File("/usr/lib")})); ++ List directories = new ArrayList<>(Arrays.asList(new File[] {new File("/usr/lib64/accumulo"), new File("/usr/lib/accumulo")})); // Check in ACCUMULO_HOME location, too String envAccumuloHome = System.getenv("ACCUMULO_HOME"); if (envAccumuloHome != null) { diff --git a/sources b/sources index 3f8d6f9..20cb99c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -657005739bdcc4bed717fd4398e9f5df accumulo-1.6.6-src.tar.gz +SHA512 (accumulo-1.8.1-src.tar.gz) = c6ed00bb668954e504a564c0fffc5d0aa876bce6df2b5419e7b431911cb8b9831640a6ac658f8ecca81d473395652683eb29a0ed1407ab0be0239697919cd9c2 diff --git a/thrift-0.10.0.patch b/thrift-0.10.0.patch new file mode 100644 index 0000000..53ab218 --- /dev/null +++ b/thrift-0.10.0.patch @@ -0,0 +1,26 @@ +diff --git a/core/src/main/scripts/generate-thrift.sh b/core/src/main/scripts/generate-thrift.sh +index 691ea79..a149fd6 100755 +--- a/core/src/main/scripts/generate-thrift.sh ++++ b/core/src/main/scripts/generate-thrift.sh +@@ -26,7 +26,7 @@ + # INCLUDED_MODULES should be an array that includes other Maven modules with src/main/thrift directories + # Use INCLUDED_MODULES=(-) in calling scripts that require no other modules + # ======================================================================================================================== +-[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.9.3' ++[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.10.0' + [[ -z $INCLUDED_MODULES ]] && INCLUDED_MODULES=(../server/tracer) + [[ -z $BASE_OUTPUT_PACKAGE ]] && BASE_OUTPUT_PACKAGE='org.apache.accumulo.core' + [[ -z $PACKAGES_TO_GENERATE ]] && PACKAGES_TO_GENERATE=(gc master tabletserver security client.impl data replication trace) +diff --git a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java b/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java +index d32178e..894acce 100644 +--- a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java ++++ b/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java +@@ -288,7 +288,7 @@ public class RpcWrapperTest { + } + + @Override +- public TBase deepCopy() { ++ public foo_args deepCopy() { + throw new UnsupportedOperationException(); + } + From d3b7ecff0a19e738ff9e6c4120893bf3d7cd0fde Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Sun, 26 Mar 2017 21:58:42 -0400 Subject: [PATCH 03/24] Clean up old patches and improve thrift 0.10.0 patch --- ACCUMULO-3470.patch | 1164 ------ ACCUMULO-4551-and-4584-backport.patch | 5458 +++++++++++++++++++++++++ accumulo.spec | 47 +- commons-configuration.patch | 27 - commons-math.patch | 36 - jetty9.patch | 194 - shell-not-read-conf.patch | 47 - thrift-0.10.0.patch | 26 - 8 files changed, 5488 insertions(+), 1511 deletions(-) delete mode 100644 ACCUMULO-3470.patch create mode 100644 ACCUMULO-4551-and-4584-backport.patch delete mode 100644 commons-configuration.patch delete mode 100644 commons-math.patch delete mode 100644 jetty9.patch delete mode 100644 shell-not-read-conf.patch delete mode 100644 thrift-0.10.0.patch diff --git a/ACCUMULO-3470.patch b/ACCUMULO-3470.patch deleted file mode 100644 index b618479..0000000 --- a/ACCUMULO-3470.patch +++ /dev/null @@ -1,1164 +0,0 @@ -From b363e88772ccda2a3bdeddd9378c89266c386cd3 Mon Sep 17 00:00:00 2001 -From: Dave Marion -Date: Fri, 20 May 2016 12:35:55 -0400 -Subject: [PATCH 1/1] ACCUMULO-3470: Set commons-vfs2 version to 2.1, removed - VFS related classes, updated imports - ---- - pom.xml | 2 +- - .../classloader/vfs/AccumuloVFSClassLoader.java | 4 +- - .../vfs/providers/HdfsFileAttributes.java | 59 ---- - .../vfs/providers/HdfsFileContentInfoFactory.java | 49 --- - .../classloader/vfs/providers/HdfsFileObject.java | 303 ------------------- - .../vfs/providers/HdfsFileProvider.java | 75 ----- - .../classloader/vfs/providers/HdfsFileSystem.java | 137 --------- - .../vfs/providers/HdfsFileSystemConfigBuilder.java | 45 --- - .../vfs/providers/HdfsRandomAccessContent.java | 329 --------------------- - .../start/classloader/vfs/providers/package.html | 19 -- - .../providers/ReadOnlyHdfsFileProviderTest.java | 2 + - .../org/apache/accumulo/test/AccumuloDFSBase.java | 2 +- - 12 files changed, 6 insertions(+), 1020 deletions(-) - delete mode 100644 start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileAttributes.java - delete mode 100644 start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileContentInfoFactory.java - delete mode 100644 start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileObject.java - delete mode 100644 start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileProvider.java - delete mode 100644 start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileSystem.java - delete mode 100644 start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileSystemConfigBuilder.java - delete mode 100644 start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsRandomAccessContent.java - delete mode 100644 start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/package.html - -diff --git a/pom.xml b/pom.xml -index d4b3867..2b48125 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -336,7 +336,7 @@ - - org.apache.commons - commons-vfs2 -- 2.0 -+ 2.1 - - - org.apache.hadoop -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java -index 38d7469..98b3b54 100644 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java -+++ b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoader.java -@@ -27,8 +27,6 @@ import java.util.Collections; - import java.util.List; - - import org.apache.accumulo.start.classloader.AccumuloClassLoader; --import org.apache.accumulo.start.classloader.vfs.providers.HdfsFileObject; --import org.apache.accumulo.start.classloader.vfs.providers.HdfsFileProvider; - import org.apache.commons.io.FileUtils; - import org.apache.commons.vfs2.CacheStrategy; - import org.apache.commons.vfs2.FileObject; -@@ -40,6 +38,8 @@ import org.apache.commons.vfs2.impl.DefaultFileSystemManager; - import org.apache.commons.vfs2.impl.FileContentInfoFilenameFactory; - import org.apache.commons.vfs2.impl.VFSClassLoader; - import org.apache.commons.vfs2.provider.FileReplicator; -+import org.apache.commons.vfs2.provider.hdfs.HdfsFileObject; -+import org.apache.commons.vfs2.provider.hdfs.HdfsFileProvider; - import org.apache.hadoop.conf.Configuration; - import org.apache.hadoop.fs.FileSystem; - import org.apache.log4j.Logger; -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileAttributes.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileAttributes.java -deleted file mode 100644 -index bfdd561..0000000 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileAttributes.java -+++ /dev/null -@@ -1,59 +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.accumulo.start.classloader.vfs.providers; -- --/** -- * HDFS file content attributes. -- * -- * @since 2.1 -- */ --public enum HdfsFileAttributes { -- /** -- * Last access time. -- */ -- LAST_ACCESS_TIME, -- -- /** -- * Block size. -- */ -- BLOCK_SIZE, -- -- /** -- * Group. -- */ -- GROUP, -- -- /** -- * Owner. -- */ -- OWNER, -- -- /** -- * Permissions. -- */ -- PERMISSIONS, -- -- /** -- * Length. -- */ -- LENGTH, -- -- /** -- * Modification time. -- */ -- MODIFICATION_TIME; --} -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileContentInfoFactory.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileContentInfoFactory.java -deleted file mode 100644 -index b1a4abe..0000000 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileContentInfoFactory.java -+++ /dev/null -@@ -1,49 +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.accumulo.start.classloader.vfs.providers; -- --import org.apache.commons.vfs2.FileContent; --import org.apache.commons.vfs2.FileContentInfo; --import org.apache.commons.vfs2.FileContentInfoFactory; --import org.apache.commons.vfs2.FileSystemException; --import org.apache.commons.vfs2.impl.DefaultFileContentInfo; -- --/** -- * Creates FileContentInfo instances for HDFS. -- * -- * @since 2.1 -- */ --public class HdfsFileContentInfoFactory implements FileContentInfoFactory { -- private static final java.nio.charset.Charset UTF_8 = java.nio.charset.Charset.forName("UTF-8"); -- private static final String CONTENT = "text/plain"; -- private static final String ENCODING = UTF_8.name(); -- -- /** -- * Creates a FileContentInfo for a the given FileContent. -- * -- * @param fileContent -- * Use this FileContent to create a matching FileContentInfo -- * @return a FileContentInfo for the given FileContent with content set to "text/plain" and encoding set to "UTF-8" -- * @throws FileSystemException -- * when a problem occurs creating the FileContentInfo. -- */ -- @Override -- public FileContentInfo create(final FileContent fileContent) throws FileSystemException { -- return new DefaultFileContentInfo(CONTENT, ENCODING); -- } -- --} -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileObject.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileObject.java -deleted file mode 100644 -index 6849073..0000000 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileObject.java -+++ /dev/null -@@ -1,303 +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.accumulo.start.classloader.vfs.providers; -- --import java.io.FileNotFoundException; --import java.io.InputStream; --import java.util.HashMap; --import java.util.Map; -- --import org.apache.commons.vfs2.FileNotFolderException; --import org.apache.commons.vfs2.FileObject; --import org.apache.commons.vfs2.FileSystemException; --import org.apache.commons.vfs2.FileType; --import org.apache.commons.vfs2.RandomAccessContent; --import org.apache.commons.vfs2.provider.AbstractFileName; --import org.apache.commons.vfs2.provider.AbstractFileObject; --import org.apache.commons.vfs2.util.RandomAccessMode; --import org.apache.hadoop.fs.FileStatus; --import org.apache.hadoop.fs.FileSystem; --import org.apache.hadoop.fs.Path; -- --/** -- * A VFS representation of an HDFS file. -- * -- * @since 2.1 -- */ --public class HdfsFileObject extends AbstractFileObject { -- private final HdfsFileSystem fs; -- private final FileSystem hdfs; -- private final Path path; -- private FileStatus stat; -- -- /** -- * Constructs a new HDFS FileObject -- * -- * @param name -- * FileName -- * @param fs -- * HdfsFileSystem instance -- * @param hdfs -- * Hadoop FileSystem instance -- * @param p -- * Path to the file in HDFS -- */ -- protected HdfsFileObject(final AbstractFileName name, final HdfsFileSystem fs, final FileSystem hdfs, final Path p) { -- super(name, fs); -- this.fs = fs; -- this.hdfs = hdfs; -- this.path = p; -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#canRenameTo(org.apache.commons.vfs2.FileObject) -- */ -- @Override -- public boolean canRenameTo(final FileObject newfile) { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doAttach() -- */ -- @Override -- protected void doAttach() throws Exception { -- try { -- this.stat = this.hdfs.getFileStatus(this.path); -- } catch (final FileNotFoundException e) { -- this.stat = null; -- return; -- } -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doGetAttributes() -- */ -- @Override -- protected Map doGetAttributes() throws Exception { -- if (null == this.stat) { -- return super.doGetAttributes(); -- } else { -- final Map attrs = new HashMap(); -- attrs.put(HdfsFileAttributes.LAST_ACCESS_TIME.toString(), this.stat.getAccessTime()); -- attrs.put(HdfsFileAttributes.BLOCK_SIZE.toString(), this.stat.getBlockSize()); -- attrs.put(HdfsFileAttributes.GROUP.toString(), this.stat.getGroup()); -- attrs.put(HdfsFileAttributes.OWNER.toString(), this.stat.getOwner()); -- attrs.put(HdfsFileAttributes.PERMISSIONS.toString(), this.stat.getPermission().toString()); -- attrs.put(HdfsFileAttributes.LENGTH.toString(), this.stat.getLen()); -- attrs.put(HdfsFileAttributes.MODIFICATION_TIME.toString(), this.stat.getModificationTime()); -- return attrs; -- } -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doGetContentSize() -- */ -- @Override -- protected long doGetContentSize() throws Exception { -- return stat.getLen(); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doGetInputStream() -- */ -- @Override -- protected InputStream doGetInputStream() throws Exception { -- return this.hdfs.open(this.path); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doGetLastModifiedTime() -- */ -- @Override -- protected long doGetLastModifiedTime() throws Exception { -- if (null != this.stat) { -- return this.stat.getModificationTime(); -- } else { -- return -1; -- } -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doGetRandomAccessContent (org.apache.commons.vfs2.util.RandomAccessMode) -- */ -- @Override -- protected RandomAccessContent doGetRandomAccessContent(final RandomAccessMode mode) throws Exception { -- if (mode.equals(RandomAccessMode.READWRITE)) { -- throw new UnsupportedOperationException(); -- } -- return new HdfsRandomAccessContent(this.path, this.hdfs); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doGetType() -- */ -- @Override -- // TODO Remove deprecation warning suppression when Hadoop1 support is dropped -- @SuppressWarnings("deprecation") -- protected FileType doGetType() throws Exception { -- try { -- doAttach(); -- if (null == stat) { -- return FileType.IMAGINARY; -- } -- if (stat.isDir()) { -- return FileType.FOLDER; -- } else { -- return FileType.FILE; -- } -- } catch (final FileNotFoundException fnfe) { -- return FileType.IMAGINARY; -- } -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doIsHidden() -- */ -- @Override -- protected boolean doIsHidden() throws Exception { -- return false; -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doIsReadable() -- */ -- @Override -- protected boolean doIsReadable() throws Exception { -- return true; -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doIsSameFile(org.apache.commons.vfs2.FileObject) -- */ -- @Override -- protected boolean doIsSameFile(final FileObject destFile) throws FileSystemException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doIsWriteable() -- */ -- @Override -- protected boolean doIsWriteable() throws Exception { -- return false; -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doListChildren() -- */ -- @Override -- protected String[] doListChildren() throws Exception { -- if (this.doGetType() != FileType.FOLDER) { -- throw new FileNotFolderException(this); -- } -- -- final FileStatus[] files = this.hdfs.listStatus(this.path); -- final String[] children = new String[files.length]; -- int i = 0; -- for (final FileStatus status : files) { -- children[i++] = status.getPath().getName(); -- } -- return children; -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doListChildrenResolved() -- */ -- @Override -- protected FileObject[] doListChildrenResolved() throws Exception { -- if (this.doGetType() != FileType.FOLDER) { -- return null; -- } -- final String[] children = doListChildren(); -- final FileObject[] fo = new FileObject[children.length]; -- for (int i = 0; i < children.length; i++) { -- final Path p = new Path(this.path, children[i]); -- fo[i] = this.fs.resolveFile(p.toUri().toString()); -- } -- return fo; -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doRemoveAttribute(java.lang.String) -- */ -- @Override -- protected void doRemoveAttribute(final String attrName) throws Exception { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doSetAttribute(java.lang.String, java.lang.Object) -- */ -- @Override -- protected void doSetAttribute(final String attrName, final Object value) throws Exception { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#doSetLastModifiedTime(long) -- */ -- @Override -- protected boolean doSetLastModifiedTime(final long modtime) throws Exception { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.lang.Object#equals(java.lang.Object) -- */ -- @Override -- public boolean equals(final Object o) { -- if (null == o) { -- return false; -- } -- if (o == this) { -- return true; -- } -- if (o instanceof HdfsFileObject) { -- final HdfsFileObject other = (HdfsFileObject) o; -- if (other.path.equals(this.path)) { -- return true; -- } -- } -- return false; -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileObject#exists() -- * @return boolean true if file exists, false if not -- */ -- @Override -- public boolean exists() throws FileSystemException { -- try { -- doAttach(); -- return this.stat != null; -- } catch (final FileNotFoundException fne) { -- return false; -- } catch (final Exception e) { -- throw new FileSystemException("Unable to check existance ", e); -- } -- } -- -- /** -- * @see java.lang.Object#hashCode() -- */ -- @Override -- public int hashCode() { -- return this.path.getName().toString().hashCode(); -- } -- --} -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileProvider.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileProvider.java -deleted file mode 100644 -index 9ddfab5..0000000 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileProvider.java -+++ /dev/null -@@ -1,75 +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.accumulo.start.classloader.vfs.providers; -- --import java.util.Arrays; --import java.util.Collection; --import java.util.Collections; -- --import org.apache.commons.vfs2.Capability; --import org.apache.commons.vfs2.FileName; --import org.apache.commons.vfs2.FileSystem; --import org.apache.commons.vfs2.FileSystemConfigBuilder; --import org.apache.commons.vfs2.FileSystemException; --import org.apache.commons.vfs2.FileSystemOptions; --import org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider; --import org.apache.commons.vfs2.provider.http.HttpFileNameParser; -- --/** -- * FileProvider for HDFS files. -- * -- * @since 2.1 -- */ --public class HdfsFileProvider extends AbstractOriginatingFileProvider { -- protected static final Collection CAPABILITIES = Collections.unmodifiableCollection(Arrays.asList(new Capability[] {Capability.GET_TYPE, -- Capability.READ_CONTENT, Capability.URI, Capability.GET_LAST_MODIFIED, Capability.ATTRIBUTES, Capability.RANDOM_ACCESS_READ, -- Capability.DIRECTORY_READ_CONTENT, Capability.LIST_CHILDREN})); -- -- /** -- * Constructs a new HdfsFileProvider -- */ -- public HdfsFileProvider() { -- super(); -- this.setFileNameParser(HttpFileNameParser.getInstance()); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider#doCreateFileSystem(org.apache.commons.vfs2.FileName, -- * org.apache.commons.vfs2.FileSystemOptions) -- */ -- @Override -- protected FileSystem doCreateFileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions) throws FileSystemException { -- return new HdfsFileSystem(rootName, fileSystemOptions); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.FileProvider#getCapabilities() -- */ -- @Override -- public Collection getCapabilities() { -- return CAPABILITIES; -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileProvider#getConfigBuilder() -- */ -- @Override -- public FileSystemConfigBuilder getConfigBuilder() { -- return HdfsFileSystemConfigBuilder.getInstance(); -- } -- --} -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileSystem.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileSystem.java -deleted file mode 100644 -index 8d45555..0000000 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileSystem.java -+++ /dev/null -@@ -1,137 +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.accumulo.start.classloader.vfs.providers; -- --import java.io.IOException; --import java.io.UnsupportedEncodingException; --import java.net.URLDecoder; --import java.util.Collection; -- --import org.apache.commons.logging.Log; --import org.apache.commons.logging.LogFactory; --import org.apache.commons.vfs2.CacheStrategy; --import org.apache.commons.vfs2.Capability; --import org.apache.commons.vfs2.FileName; --import org.apache.commons.vfs2.FileObject; --import org.apache.commons.vfs2.FileSystemException; --import org.apache.commons.vfs2.FileSystemOptions; --import org.apache.commons.vfs2.provider.AbstractFileName; --import org.apache.commons.vfs2.provider.AbstractFileSystem; --import org.apache.hadoop.conf.Configuration; --import org.apache.hadoop.fs.FileSystem; --import org.apache.hadoop.fs.Path; -- --/** -- * A VFS FileSystem that interacts with HDFS. -- * -- * @since 2.1 -- */ --public class HdfsFileSystem extends AbstractFileSystem { -- private static final java.nio.charset.Charset UTF_8 = java.nio.charset.Charset.forName("UTF-8"); -- private static final Log log = LogFactory.getLog(HdfsFileSystem.class); -- -- private FileSystem fs; -- -- protected HdfsFileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions) { -- super(rootName, null, fileSystemOptions); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileSystem#addCapabilities(java.util.Collection) -- */ -- @Override -- protected void addCapabilities(final Collection capabilities) { -- capabilities.addAll(HdfsFileProvider.CAPABILITIES); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileSystem#close() -- */ -- @Override -- synchronized public void close() { -- try { -- if (null != fs) { -- fs.close(); -- } -- } catch (final IOException e) { -- throw new RuntimeException("Error closing HDFS client", e); -- } -- super.close(); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileSystem#createFile(org.apache.commons.vfs2.provider.AbstractFileName) -- */ -- @Override -- protected FileObject createFile(final AbstractFileName name) throws Exception { -- throw new FileSystemException("Operation not supported"); -- } -- -- /** -- * @see org.apache.commons.vfs2.provider.AbstractFileSystem#resolveFile(org.apache.commons.vfs2.FileName) -- */ -- @Override -- public FileObject resolveFile(final FileName name) throws FileSystemException { -- -- synchronized (this) { -- if (null == this.fs) { -- final String hdfsUri = name.getRootURI(); -- final Configuration conf = new Configuration(true); -- conf.set(org.apache.hadoop.fs.FileSystem.FS_DEFAULT_NAME_KEY, hdfsUri); -- this.fs = null; -- try { -- fs = org.apache.hadoop.fs.FileSystem.get(conf); -- } catch (final IOException e) { -- log.error("Error connecting to filesystem " + hdfsUri, e); -- throw new FileSystemException("Error connecting to filesystem " + hdfsUri, e); -- } -- } -- } -- -- boolean useCache = (null != getContext().getFileSystemManager().getFilesCache()); -- FileObject file; -- if (useCache) { -- file = this.getFileFromCache(name); -- } else { -- file = null; -- } -- if (null == file) { -- String path = null; -- try { -- path = URLDecoder.decode(name.getPath(), UTF_8.name()); -- } catch (final UnsupportedEncodingException e) { -- path = name.getPath(); -- } -- final Path filePath = new Path(path); -- file = new HdfsFileObject((AbstractFileName) name, this, fs, filePath); -- if (useCache) { -- this.putFileToCache(file); -- } -- -- } -- -- /** -- * resync the file information if requested -- */ -- if (getFileSystemManager().getCacheStrategy().equals(CacheStrategy.ON_RESOLVE)) { -- file.refresh(); -- } -- -- return file; -- } -- --} -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileSystemConfigBuilder.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileSystemConfigBuilder.java -deleted file mode 100644 -index 0defa56..0000000 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsFileSystemConfigBuilder.java -+++ /dev/null -@@ -1,45 +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.accumulo.start.classloader.vfs.providers; -- --import org.apache.commons.vfs2.FileSystem; --import org.apache.commons.vfs2.FileSystemConfigBuilder; -- --/** -- * Configuration settings for the HdfsFileSystem. -- * -- * @since 2.1 -- */ --public class HdfsFileSystemConfigBuilder extends FileSystemConfigBuilder { -- private static final HdfsFileSystemConfigBuilder BUILDER = new HdfsFileSystemConfigBuilder(); -- -- /** -- * @return HdfsFileSystemConfigBuilder instance -- */ -- public static HdfsFileSystemConfigBuilder getInstance() { -- return BUILDER; -- } -- -- /** -- * @return HDFSFileSystem -- */ -- @Override -- protected Class getConfigClass() { -- return HdfsFileSystem.class; -- } -- --} -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsRandomAccessContent.java b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsRandomAccessContent.java -deleted file mode 100644 -index 30140ba..0000000 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/HdfsRandomAccessContent.java -+++ /dev/null -@@ -1,329 +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.accumulo.start.classloader.vfs.providers; -- --import java.io.BufferedReader; --import java.io.IOException; --import java.io.InputStream; --import java.io.InputStreamReader; -- --import org.apache.commons.vfs2.RandomAccessContent; --import org.apache.hadoop.fs.FSDataInputStream; --import org.apache.hadoop.fs.FileSystem; --import org.apache.hadoop.fs.Path; -- --/** -- * Provides random access to content in an HdfsFileObject. Currently this only supports read operations. All write operations throw an -- * {@link UnsupportedOperationException}. -- * -- * @since 2.1 -- */ --public class HdfsRandomAccessContent implements RandomAccessContent { -- private static final java.nio.charset.Charset UTF_8 = java.nio.charset.Charset.forName("UTF-8"); -- private final FileSystem fs; -- private final Path path; -- private final FSDataInputStream fis; -- -- /** -- * -- * @param path -- * A Hadoop Path -- * @param fs -- * A Hadoop FileSystem -- * @throws IOException -- * when the path cannot be processed. -- */ -- public HdfsRandomAccessContent(final Path path, final FileSystem fs) throws IOException { -- this.fs = fs; -- this.path = path; -- this.fis = this.fs.open(this.path); -- } -- -- /** -- * @see org.apache.commons.vfs2.RandomAccessContent#close() -- */ -- @Override -- public void close() throws IOException { -- this.fis.close(); -- } -- -- /** -- * @see org.apache.commons.vfs2.RandomAccessContent#getFilePointer() -- */ -- @Override -- public long getFilePointer() throws IOException { -- return this.fis.getPos(); -- } -- -- /** -- * @see org.apache.commons.vfs2.RandomAccessContent#getInputStream() -- */ -- @Override -- public InputStream getInputStream() throws IOException { -- return this.fis; -- } -- -- /** -- * @see org.apache.commons.vfs2.RandomAccessContent#length() -- */ -- @Override -- public long length() throws IOException { -- return this.fs.getFileStatus(this.path).getLen(); -- } -- -- /** -- * @see java.io.DataInput#readBoolean() -- */ -- @Override -- public boolean readBoolean() throws IOException { -- return this.fis.readBoolean(); -- } -- -- /** -- * @see java.io.DataInput#readByte() -- */ -- @Override -- public byte readByte() throws IOException { -- return this.fis.readByte(); -- } -- -- /** -- * @see java.io.DataInput#readChar() -- */ -- @Override -- public char readChar() throws IOException { -- return this.fis.readChar(); -- } -- -- /** -- * @see java.io.DataInput#readDouble() -- */ -- @Override -- public double readDouble() throws IOException { -- return this.fis.readDouble(); -- } -- -- /** -- * @see java.io.DataInput#readFloat() -- */ -- @Override -- public float readFloat() throws IOException { -- return this.fis.readFloat(); -- } -- -- /** -- * @see java.io.DataInput#readFully(byte[]) -- */ -- @Override -- public void readFully(final byte[] b) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataInput#readFully(byte[], int, int) -- */ -- @Override -- public void readFully(final byte[] b, final int off, final int len) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataInput#readInt() -- */ -- @Override -- public int readInt() throws IOException { -- return this.fis.readInt(); -- } -- -- /** -- * @see java.io.DataInput#readLine() -- */ -- @Override -- public String readLine() throws IOException { -- BufferedReader d = new BufferedReader(new InputStreamReader(this.fis, UTF_8)); -- return d.readLine(); -- } -- -- /** -- * @see java.io.DataInput#readLong() -- */ -- @Override -- public long readLong() throws IOException { -- return this.fis.readLong(); -- } -- -- /** -- * @see java.io.DataInput#readShort() -- */ -- @Override -- public short readShort() throws IOException { -- return this.fis.readShort(); -- } -- -- /** -- * @see java.io.DataInput#readUnsignedByte() -- */ -- @Override -- public int readUnsignedByte() throws IOException { -- return this.fis.readUnsignedByte(); -- } -- -- /** -- * @see java.io.DataInput#readUnsignedShort() -- */ -- @Override -- public int readUnsignedShort() throws IOException { -- return this.fis.readUnsignedShort(); -- } -- -- /** -- * @see java.io.DataInput#readUTF() -- */ -- @Override -- public String readUTF() throws IOException { -- return this.fis.readUTF(); -- } -- -- /** -- * @see org.apache.commons.vfs2.RandomAccessContent#seek(long) -- */ -- @Override -- public void seek(final long pos) throws IOException { -- this.fis.seek(pos); -- } -- -- /** -- * @see java.io.DataInput#skipBytes(int) -- */ -- @Override -- public int skipBytes(final int n) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#write(byte[]) -- */ -- @Override -- public void write(final byte[] b) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#write(byte[], int, int) -- */ -- @Override -- public void write(final byte[] b, final int off, final int len) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#write(int) -- */ -- @Override -- public void write(final int b) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeBoolean(boolean) -- */ -- @Override -- public void writeBoolean(final boolean v) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeByte(int) -- */ -- @Override -- public void writeByte(final int v) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeBytes(java.lang.String) -- */ -- @Override -- public void writeBytes(final String s) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeChar(int) -- */ -- @Override -- public void writeChar(final int v) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeChars(java.lang.String) -- */ -- @Override -- public void writeChars(final String s) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeDouble(double) -- */ -- @Override -- public void writeDouble(final double v) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeFloat(float) -- */ -- @Override -- public void writeFloat(final float v) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeInt(int) -- */ -- @Override -- public void writeInt(final int v) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeLong(long) -- */ -- @Override -- public void writeLong(final long v) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeShort(int) -- */ -- @Override -- public void writeShort(final int v) throws IOException { -- throw new UnsupportedOperationException(); -- } -- -- /** -- * @see java.io.DataOutput#writeUTF(java.lang.String) -- */ -- @Override -- public void writeUTF(final String s) throws IOException { -- throw new UnsupportedOperationException(); -- } -- --} -diff --git a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/package.html b/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/package.html -deleted file mode 100644 -index 8cbb34e..0000000 ---- a/start/src/main/java/org/apache/accumulo/start/classloader/vfs/providers/package.html -+++ /dev/null -@@ -1,19 +0,0 @@ -- -- --

The HDFS File Provider

-- -diff --git a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/providers/ReadOnlyHdfsFileProviderTest.java b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/providers/ReadOnlyHdfsFileProviderTest.java -index b5cec83..5b69df9 100644 ---- a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/providers/ReadOnlyHdfsFileProviderTest.java -+++ b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/providers/ReadOnlyHdfsFileProviderTest.java -@@ -24,6 +24,8 @@ import org.apache.commons.vfs2.FileObject; - import org.apache.commons.vfs2.FileSystemException; - import org.apache.commons.vfs2.FileType; - import org.apache.commons.vfs2.impl.DefaultFileSystemManager; -+import org.apache.commons.vfs2.provider.hdfs.HdfsFileAttributes; -+import org.apache.commons.vfs2.provider.hdfs.HdfsFileProvider; - import org.apache.commons.vfs2.util.RandomAccessMode; - import org.apache.hadoop.fs.FileSystem; - import org.apache.hadoop.fs.Path; -diff --git a/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java b/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java -index feab493..343a3ee 100644 ---- a/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java -+++ b/start/src/test/java/org/apache/accumulo/test/AccumuloDFSBase.java -@@ -21,7 +21,6 @@ import java.io.IOException; - import java.net.URI; - - import org.apache.accumulo.start.classloader.vfs.MiniDFSUtil; --import org.apache.accumulo.start.classloader.vfs.providers.HdfsFileProvider; - import org.apache.commons.vfs2.CacheStrategy; - import org.apache.commons.vfs2.FileSystemException; - import org.apache.commons.vfs2.cache.DefaultFilesCache; -@@ -29,6 +28,7 @@ import org.apache.commons.vfs2.cache.SoftRefFilesCache; - import org.apache.commons.vfs2.impl.DefaultFileReplicator; - import org.apache.commons.vfs2.impl.DefaultFileSystemManager; - import org.apache.commons.vfs2.impl.FileContentInfoFilenameFactory; -+import org.apache.commons.vfs2.provider.hdfs.HdfsFileProvider; - import org.apache.hadoop.conf.Configuration; - import org.apache.hadoop.hdfs.DFSConfigKeys; - import org.apache.hadoop.hdfs.MiniDFSCluster; --- -2.7.4 - diff --git a/ACCUMULO-4551-and-4584-backport.patch b/ACCUMULO-4551-and-4584-backport.patch new file mode 100644 index 0000000..3f46194 --- /dev/null +++ b/ACCUMULO-4551-and-4584-backport.patch @@ -0,0 +1,5458 @@ +diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java b/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java +new file mode 100644 +index 0000000..9636fe5 +--- /dev/null ++++ b/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java +@@ -0,0 +1,56 @@ ++/* ++ * 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.accumulo.core.rpc; ++ ++import org.apache.thrift.TApplicationException; ++import org.apache.thrift.TBase; ++import org.apache.thrift.TException; ++import org.apache.thrift.TServiceClient; ++import org.apache.thrift.protocol.TMessage; ++import org.apache.thrift.protocol.TMessageType; ++import org.apache.thrift.protocol.TProtocol; ++ ++// Wrapper for THRIFT-4062 workaround; shouldn't be needed in newer versions ++// Also update generate-thrift.sh to stop using this ++public abstract class TServiceClientWrapper extends TServiceClient { ++ ++ public TServiceClientWrapper(TProtocol iprot, TProtocol oprot) { ++ super(iprot, oprot); ++ } ++ ++ public TServiceClientWrapper(TProtocol prot) { ++ super(prot); ++ } ++ ++ @Override ++ protected void receiveBase(TBase result, String methodName) throws TException { ++ TMessage msg = iprot_.readMessageBegin(); ++ if (msg.type == TMessageType.EXCEPTION) { ++ TApplicationException x = new TApplicationException(); ++ x.read(iprot_); ++ iprot_.readMessageEnd(); ++ throw x; ++ } ++ if (msg.seqid != seqid_) { ++ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, String.format("%s failed: out of sequence response: expected %d but got %d", ++ methodName, seqid_, msg.seqid)); ++ } ++ result.read(iprot_); ++ iprot_.readMessageEnd(); ++ } ++ ++} +diff --git a/core/src/main/scripts/generate-thrift.sh b/core/src/main/scripts/generate-thrift.sh +index 691ea79..d189323 100755 +--- a/core/src/main/scripts/generate-thrift.sh ++++ b/core/src/main/scripts/generate-thrift.sh +@@ -26,7 +26,7 @@ + # INCLUDED_MODULES should be an array that includes other Maven modules with src/main/thrift directories + # Use INCLUDED_MODULES=(-) in calling scripts that require no other modules + # ======================================================================================================================== +-[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.9.3' ++[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.10.0' + [[ -z $INCLUDED_MODULES ]] && INCLUDED_MODULES=(../server/tracer) + [[ -z $BASE_OUTPUT_PACKAGE ]] && BASE_OUTPUT_PACKAGE='org.apache.accumulo.core' + [[ -z $PACKAGES_TO_GENERATE ]] && PACKAGES_TO_GENERATE=(gc master tabletserver security client.impl data replication trace) +@@ -71,11 +71,16 @@ for f in src/main/thrift/*.thrift; do + thrift ${THRIFT_ARGS} --gen cpp "$f" || fail unable to generate cpp thrift classes + done + +-# For all generated thrift code, suppress all warnings and add the LICENSE header +-cs='@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"})' +-es='@SuppressWarnings({"unused"})' +-find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/"unchecked"/"unchecked", "unused"/' +-find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/\(public enum [A-Z]\)/'"$es"' \1/' ++# For all generated thrift code, get rid of all warnings and add the LICENSE header ++ ++# workaround for THRIFT-4062; should be fixed in newer thrift versions ++find $BUILD_DIR/gen-java -name '*.java' -exec sed -i -e 's/\(org[.]apache[.]\)thrift\([.]TServiceClient\) /\1accumulo.core.rpc\2Wrapper /' {} + ++# upstream stopped doing import statements for classes, but overlooked enums; delete unused imports ++find $BUILD_DIR/gen-java -name '*.java' -exec grep -Zl '^public enum ' {} + | xargs -0 sed -i -e '/^import .*$/d' ++# add dummy method to suppress "unnecessary suppress warnings" for classes which don't have any unused variables ++# this only affects classes, enums aren't affected ++find $BUILD_DIR/gen-java -name '*.java' -exec grep -Zl '^public class ' {} + | xargs -0 sed -i -e 's/^[}]$/ private static void unusedMethod() {}\ ++}/' + + for lang in "${LANGUAGES_TO_GENERATE[@]}"; do + case $lang in +diff --git a/core/src/main/thrift/client.thrift b/core/src/main/thrift/client.thrift +index 38a8076..2268574 100644 +--- a/core/src/main/thrift/client.thrift ++++ b/core/src/main/thrift/client.thrift +@@ -129,15 +129,15 @@ service ClientService { + list getUserAuthorizations(3:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string principal) throws (1:ThriftSecurityException sec) + + // permissions-related methods +- bool hasSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte sysPerm) throws (1:ThriftSecurityException sec) +- bool hasTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte tblPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) +- bool hasNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte tblNspcPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) +- void grantSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec) +- void revokeSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec) +- void grantTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) +- void revokeTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) +- void grantNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) +- void revokeNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) ++ bool hasSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 sysPerm) throws (1:ThriftSecurityException sec) ++ bool hasTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 tblPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) ++ bool hasNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 tblNspcPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) ++ void grantSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 permission) throws (1:ThriftSecurityException sec) ++ void revokeSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 permission) throws (1:ThriftSecurityException sec) ++ void grantTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) ++ void revokeTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) ++ void grantNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) ++ void revokeNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) + + // configuration methods + map getConfiguration(2:trace.TInfo tinfo, 3:security.TCredentials credentials, 1:ConfigurationType type); +diff --git a/core/src/main/thrift/master.thrift b/core/src/main/thrift/master.thrift +index 6104fea..3b55ccf 100644 +--- a/core/src/main/thrift/master.thrift ++++ b/core/src/main/thrift/master.thrift +@@ -112,7 +112,7 @@ struct DeadServer { + struct MasterMonitorInfo { + 1:map tableMap + 2:list tServerInfo +- 3:map badTServers ++ 3:map badTServers + 6:MasterState state + 8:MasterGoalState goalState + 7:i32 unassignedTablets +diff --git a/pom.xml b/pom.xml +index 3530a3e..6d90eda 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -154,7 +154,7 @@ + false + + +- 0.9.3 ++ 0.10.0 + + 3.4.6 + +diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java +index a3d185d..3cc16a4 100644 +--- a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java ++++ b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java +@@ -201,7 +201,7 @@ public class Proxy implements KeywordExecutable { + ProxyServer impl = new ProxyServer(properties); + + // Wrap the implementation -- translate some exceptions +- AccumuloProxy.Iface wrappedImpl = RpcWrapper.service(impl, new AccumuloProxy.Processor(impl)); ++ AccumuloProxy.Iface wrappedImpl = RpcWrapper.service(impl); + + // Create the processor from the implementation + TProcessor processor = new AccumuloProxy.Processor<>(wrappedImpl); +diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java +index b942913..6fdbb04 100644 +--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java ++++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java +@@ -19,19 +19,11 @@ package org.apache.accumulo.server.rpc; + import java.lang.reflect.InvocationHandler; + import java.lang.reflect.Method; + import java.lang.reflect.Proxy; +-import java.util.HashSet; +-import java.util.Map; +-import java.util.Map.Entry; +-import java.util.Set; + + import org.apache.accumulo.core.trace.wrappers.RpcServerInvocationHandler; + import org.apache.accumulo.core.trace.wrappers.TraceWrap; +-import org.apache.thrift.ProcessFunction; + import org.apache.thrift.TApplicationException; +-import org.apache.thrift.TBaseProcessor; + import org.apache.thrift.TException; +-import org.slf4j.Logger; +-import org.slf4j.LoggerFactory; + + /** + * This class accommodates the changes in THRIFT-1805, which appeared in Thrift 0.9.1 and restricts client-side notification of server-side errors to +@@ -49,23 +41,17 @@ import org.slf4j.LoggerFactory; + * @since 1.6.1 + */ + public class RpcWrapper { +- private static final Logger log = LoggerFactory.getLogger(RpcWrapper.class); + +- public static I service(final I instance, final TBaseProcessor processor) { +- final Map> processorView = processor.getProcessMapView(); +- final Set onewayMethods = getOnewayMethods(processorView); +- log.debug("Found oneway Thrift methods: " + onewayMethods); +- +- InvocationHandler handler = getInvocationHandler(instance, onewayMethods); ++ public static I service(final I instance) { ++ InvocationHandler handler = getInvocationHandler(instance); + + @SuppressWarnings("unchecked") + I proxiedInstance = (I) Proxy.newProxyInstance(instance.getClass().getClassLoader(), instance.getClass().getInterfaces(), handler); + return proxiedInstance; + } + +- protected static RpcServerInvocationHandler getInvocationHandler(final T instance, final Set onewayMethods) { ++ protected static RpcServerInvocationHandler getInvocationHandler(final T instance) { + return new RpcServerInvocationHandler(instance) { +- private final Logger log = LoggerFactory.getLogger(instance.getClass()); + + @Override + public Object invoke(Object obj, Method method, Object[] args) throws Throwable { +@@ -73,56 +59,10 @@ public class RpcWrapper { + try { + return super.invoke(obj, method, args); + } catch (RuntimeException e) { +- String msg = e.getMessage(); +- log.error(msg, e); +- if (onewayMethods.contains(method.getName())) { +- throw e; +- } +- throw new TException(msg); +- } catch (Error e) { +- String msg = e.getMessage(); +- log.error(msg, e); +- if (onewayMethods.contains(method.getName())) { +- throw e; +- } +- throw new TException(msg); ++ // thrift will log the exception in ProcessFunction ++ throw new TException(e); + } + } + }; + } +- +- protected static Set getOnewayMethods(Map processorView) { +- // Get a handle on the isOnewayMethod and make it accessible +- final Method isOnewayMethod; +- try { +- isOnewayMethod = ProcessFunction.class.getDeclaredMethod("isOneway"); +- } catch (NoSuchMethodException e) { +- throw new RuntimeException("Could not access isOneway method", e); +- } catch (SecurityException e) { +- throw new RuntimeException("Could not access isOneway method", e); +- } +- // In java7, this appears to be copying the method, but it's trivial for us to return the object to how it was before. +- final boolean accessible = isOnewayMethod.isAccessible(); +- isOnewayMethod.setAccessible(true); +- +- try { +- final Set onewayMethods = new HashSet<>(); +- for (Entry entry : processorView.entrySet()) { +- try { +- if ((Boolean) isOnewayMethod.invoke(entry.getValue())) { +- onewayMethods.add(entry.getKey()); +- } +- } catch (RuntimeException e) { +- throw e; +- } catch (Exception e) { +- throw new RuntimeException(e); +- } +- } +- +- return onewayMethods; +- } finally { +- // Reset it back to how it was. +- isOnewayMethod.setAccessible(accessible); +- } +- } + } +diff --git a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java b/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java +deleted file mode 100644 +index d32178e..0000000 +--- a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java ++++ /dev/null +@@ -1,300 +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.accumulo.server.rpc; +- +-import java.util.Collections; +-import java.util.HashMap; +-import java.util.Map; +-import java.util.Set; +- +-import org.apache.accumulo.core.trace.wrappers.RpcServerInvocationHandler; +-import org.apache.thrift.ProcessFunction; +-import org.apache.thrift.TBase; +-import org.apache.thrift.TException; +-import org.apache.thrift.protocol.TProtocol; +-import org.junit.Assert; +-import org.junit.Test; +- +-import com.google.common.collect.Sets; +- +-/** +- * Verification that RpcWrapper correctly mangles Exceptions to work around Thrift. +- */ +-public class RpcWrapperTest { +- +- private static final String RTE_MESSAGE = "RpcWrapperTest's RuntimeException Message"; +- +- /** +- * Given a method name and whether or not the method is oneway, construct a ProcessFunction. +- * +- * @param methodName +- * The service method name. +- * @param isOneway +- * Is the method oneway. +- * @return A ProcessFunction. +- */ +- private fake_proc createProcessFunction(String methodName, boolean isOneway) { +- return new fake_proc<>(methodName, isOneway); +- } +- +- @Test +- public void testSomeOnewayMethods() { +- Map> procs = new HashMap<>(); +- procs.put("foo", createProcessFunction("foo", true)); +- procs.put("foobar", createProcessFunction("foobar", false)); +- procs.put("bar", createProcessFunction("bar", true)); +- procs.put("barfoo", createProcessFunction("barfoo", false)); +- +- Set onewayMethods = RpcWrapper.getOnewayMethods(procs); +- Assert.assertEquals(Sets.newHashSet("foo", "bar"), onewayMethods); +- } +- +- @Test +- public void testNoOnewayMethods() { +- Map> procs = new HashMap<>(); +- procs.put("foo", createProcessFunction("foo", false)); +- procs.put("foobar", createProcessFunction("foobar", false)); +- procs.put("bar", createProcessFunction("bar", false)); +- procs.put("barfoo", createProcessFunction("barfoo", false)); +- +- Set onewayMethods = RpcWrapper.getOnewayMethods(procs); +- Assert.assertEquals(Collections. emptySet(), onewayMethods); +- } +- +- @Test +- public void testAllOnewayMethods() { +- Map> procs = new HashMap<>(); +- procs.put("foo", createProcessFunction("foo", true)); +- procs.put("foobar", createProcessFunction("foobar", true)); +- procs.put("bar", createProcessFunction("bar", true)); +- procs.put("barfoo", createProcessFunction("barfoo", true)); +- +- Set onewayMethods = RpcWrapper.getOnewayMethods(procs); +- Assert.assertEquals(Sets.newHashSet("foo", "foobar", "bar", "barfoo"), onewayMethods); +- } +- +- @Test +- public void testNoExceptionWrappingForOneway() throws Throwable { +- final Object[] args = new Object[0]; +- +- final FakeService impl = new FakeServiceImpl(); +- +- // "short" names throw RTEs and are oneway, while long names do not throw exceptions and are not oneway. +- RpcServerInvocationHandler handler = RpcWrapper.getInvocationHandler(impl, Sets.newHashSet("foo", "bar")); +- +- // Should throw an exception, but not be wrapped because the method is oneway +- try { +- handler.invoke(impl, FakeServiceImpl.class.getMethod("foo"), args); +- Assert.fail("Expected an exception"); +- } catch (RuntimeException e) { +- Assert.assertEquals(RTE_MESSAGE, e.getMessage()); +- } +- +- // Should not throw an exception +- handler.invoke(impl, FakeServiceImpl.class.getMethod("foobar"), args); +- } +- +- @Test +- public void testExceptionWrappingForNonOneway() throws Throwable { +- final Object[] args = new Object[0]; +- +- final FakeService impl = new FakeServiceImpl(); +- +- // "short" names throw RTEs and are not oneway, while long names do not throw exceptions and are oneway. +- RpcServerInvocationHandler handler = RpcWrapper.getInvocationHandler(impl, Sets.newHashSet("foobar", "barfoo")); +- +- // Should throw an exception, but not be wrapped because the method is oneway +- try { +- handler.invoke(impl, FakeServiceImpl.class.getMethod("foo"), args); +- Assert.fail("Expected an exception"); +- } catch (TException e) { +- // The InvocationHandler should take the exception from the RTE and make it a TException +- Assert.assertEquals(RTE_MESSAGE, e.getMessage()); +- } +- +- // Should not throw an exception +- handler.invoke(impl, FakeServiceImpl.class.getMethod("foobar"), args); +- } +- +- // +- // Some hacked together classes/interfaces that mimic what Thrift is doing. +- // +- +- /** +- * Some fake fields for our fake arguments. +- */ +- private static class fake_fields implements org.apache.thrift.TFieldIdEnum { +- @Override +- public short getThriftFieldId() { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public String getFieldName() { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public boolean equals(Object o) { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public int hashCode() { +- throw new UnsupportedOperationException(); +- } +- } +- +- /** +- * A fake thrift service +- */ +- interface FakeService { +- void foo(); +- +- String foobar(); +- +- int bar(); +- +- long barfoo(); +- } +- +- /** +- * An implementation of the fake thrift service. The "short" names throw RTEs, while long names do not. +- */ +- public static class FakeServiceImpl implements FakeService { +- @Override +- public void foo() { +- throw new RuntimeException(RTE_MESSAGE); +- } +- +- @Override +- public String foobar() { +- return ""; +- } +- +- @Override +- public int bar() { +- throw new RuntimeException(RTE_MESSAGE); +- } +- +- @Override +- public long barfoo() { +- return 0; +- } +- } +- +- /** +- * A fake ProcessFunction implementation for testing that allows injection of method name and oneway. +- */ +- private static class fake_proc extends org.apache.thrift.ProcessFunction { +- final private boolean isOneway; +- +- public fake_proc(String methodName, boolean isOneway) { +- super(methodName); +- this.isOneway = isOneway; +- } +- +- @Override +- protected boolean isOneway() { +- return isOneway; +- } +- +- @SuppressWarnings("rawtypes") +- @Override +- public TBase getResult(I iface, foo_args args) throws TException { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public foo_args getEmptyArgsInstance() { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public boolean equals(Object o) { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public int hashCode() { +- throw new UnsupportedOperationException(); +- } +- } +- +- /** +- * Fake arguments for our fake service. +- */ +- private static class foo_args implements org.apache.thrift.TBase { +- +- private static final long serialVersionUID = 1L; +- +- @Override +- public boolean equals(Object o) { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public int hashCode() { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public int compareTo(foo_args o) { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public void read(TProtocol iprot) throws TException { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public void write(TProtocol oprot) throws TException { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public fake_fields fieldForId(int fieldId) { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public boolean isSet(fake_fields field) { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public Object getFieldValue(fake_fields field) { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public void setFieldValue(fake_fields field, Object value) { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public TBase deepCopy() { +- throw new UnsupportedOperationException(); +- } +- +- @Override +- public void clear() { +- throw new UnsupportedOperationException(); +- } +- } +-} +diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java +index 37d127a..b6d97ce 100644 +--- a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java ++++ b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java +@@ -343,7 +343,7 @@ public class TServerUtilsTest { + private ServerAddress startServer() throws Exception { + AccumuloServerContext ctx = new AccumuloServerContext(factory); + ClientServiceHandler clientHandler = new ClientServiceHandler(ctx, null, null); +- Iface rpcProxy = RpcWrapper.service(clientHandler, new Processor(clientHandler)); ++ Iface rpcProxy = RpcWrapper.service(clientHandler); + Processor processor = new Processor<>(rpcProxy); + // "localhost" explicitly to make sure we can always bind to that interface (avoids DNS misconfiguration) + String hostname = "localhost"; +diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java +index 76292c8..c8cbbbc 100644 +--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java ++++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java +@@ -715,7 +715,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa + } + + private HostAndPort startStatsService() throws UnknownHostException { +- Iface rpcProxy = RpcWrapper.service(this, new Processor(this)); ++ Iface rpcProxy = RpcWrapper.service(this); + final Processor processor; + if (ThriftServerType.SASL == getThriftServerType()) { + Iface tcProxy = TCredentialsUpdatingWrapper.service(rpcProxy, getClass(), getConfiguration()); +diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java +index 8009d66..010a568 100644 +--- a/server/master/src/main/java/org/apache/accumulo/master/Master.java ++++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java +@@ -1236,7 +1236,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List + } + + clientHandler = new MasterClientServiceHandler(this); +- Iface rpcProxy = RpcWrapper.service(clientHandler, new Processor(clientHandler)); ++ Iface rpcProxy = RpcWrapper.service(clientHandler); + final Processor processor; + if (ThriftServerType.SASL == getThriftServerType()) { + Iface tcredsProxy = TCredentialsUpdatingWrapper.service(rpcProxy, clientHandler.getClass(), getConfiguration()); +@@ -1270,8 +1270,8 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List + + // Start the replication coordinator which assigns tservers to service replication requests + MasterReplicationCoordinator impl = new MasterReplicationCoordinator(this); +- ReplicationCoordinator.Processor replicationCoordinatorProcessor = new ReplicationCoordinator.Processor<>(RpcWrapper.service( +- impl, new ReplicationCoordinator.Processor(impl))); ++ ReplicationCoordinator.Processor replicationCoordinatorProcessor = new ReplicationCoordinator.Processor<>( ++ RpcWrapper.service((ReplicationCoordinator.Iface) impl)); + ServerAddress replAddress = TServerUtils.startServer(this, hostname, Property.MASTER_REPLICATION_COORDINATOR_PORT, replicationCoordinatorProcessor, + "Master Replication Coordinator", "Replication Coordinator", null, Property.MASTER_REPLICATION_COORDINATOR_MINTHREADS, + Property.MASTER_REPLICATION_COORDINATOR_THREADCHECK, Property.GENERAL_MAX_MESSAGE_SIZE); +diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java +index a937235..63976e0 100644 +--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java ++++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java +@@ -18,6 +18,8 @@ package org.apache.accumulo.tserver; + + import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; + import static java.nio.charset.StandardCharsets.UTF_8; ++import static java.util.concurrent.TimeUnit.MILLISECONDS; ++import static java.util.concurrent.TimeUnit.NANOSECONDS; + import static org.apache.accumulo.server.problems.ProblemType.TABLET_LOAD; + + import java.io.IOException; +@@ -126,6 +128,7 @@ import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException; + import org.apache.accumulo.core.tabletserver.thrift.TDurability; + import org.apache.accumulo.core.tabletserver.thrift.TSampleNotPresentException; + import org.apache.accumulo.core.tabletserver.thrift.TSamplerConfiguration; ++import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal; + import org.apache.accumulo.core.tabletserver.thrift.TabletClientService; + import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface; + import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Processor; +@@ -259,9 +262,6 @@ import org.slf4j.Logger; + import org.slf4j.LoggerFactory; + + import com.google.common.net.HostAndPort; +-import static java.util.concurrent.TimeUnit.MILLISECONDS; +-import static java.util.concurrent.TimeUnit.NANOSECONDS; +-import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal; + + public class TabletServer extends AccumuloServerContext implements Runnable { + +@@ -2306,7 +2306,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable { + private HostAndPort startTabletClientService() throws UnknownHostException { + // start listening for client connection last + clientHandler = new ThriftClientHandler(); +- Iface rpcProxy = RpcWrapper.service(clientHandler, new Processor(clientHandler)); ++ Iface rpcProxy = RpcWrapper.service(clientHandler); + final Processor processor; + if (ThriftServerType.SASL == getThriftServerType()) { + Iface tcredProxy = TCredentialsUpdatingWrapper.service(rpcProxy, ThriftClientHandler.class, getConfiguration()); +@@ -2322,7 +2322,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable { + + private HostAndPort startReplicationService() throws UnknownHostException { + final ReplicationServicerHandler handler = new ReplicationServicerHandler(this); +- ReplicationServicer.Iface rpcProxy = RpcWrapper.service(handler, new ReplicationServicer.Processor(handler)); ++ ReplicationServicer.Iface rpcProxy = RpcWrapper.service(handler); + ReplicationServicer.Iface repl = TCredentialsUpdatingWrapper.service(rpcProxy, handler.getClass(), getConfiguration()); + ReplicationServicer.Processor processor = new ReplicationServicer.Processor<>(repl); + AccumuloConfiguration conf = getServerConfigurationFactory().getConfiguration(); +diff --git a/test/pom.xml b/test/pom.xml +index de2d340..3a653dc 100644 +--- a/test/pom.xml ++++ b/test/pom.xml +@@ -286,6 +286,29 @@ + + + ++ thrift ++ ++ ++ ++ org.codehaus.mojo ++ exec-maven-plugin ++ ++ ++ generate-thrift ++ ++ exec ++ ++ generate-sources ++ ++ ${basedir}/src/main/scripts/generate-thrift.sh ++ ++ ++ ++ ++ ++ ++ ++ + + mrit + +diff --git a/test/src/main/findbugs/exclude-filter.xml b/test/src/main/findbugs/exclude-filter.xml +index 3c3e596..9339c36 100644 +--- a/test/src/main/findbugs/exclude-filter.xml ++++ b/test/src/main/findbugs/exclude-filter.xml +@@ -16,6 +16,12 @@ + --> + + ++ ++ ++ ++ ++ ++ + + + +diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/Mocket.java b/test/src/main/java/org/apache/accumulo/test/rpc/Mocket.java +new file mode 100644 +index 0000000..81c774d +--- /dev/null ++++ b/test/src/main/java/org/apache/accumulo/test/rpc/Mocket.java +@@ -0,0 +1,194 @@ ++/* ++ * 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.accumulo.test.rpc; ++ ++import java.util.Objects; ++import java.util.concurrent.LinkedBlockingQueue; ++import java.util.concurrent.TimeUnit; ++import java.util.concurrent.atomic.AtomicBoolean; ++ ++import org.apache.thrift.transport.TServerTransport; ++import org.apache.thrift.transport.TTransport; ++import org.apache.thrift.transport.TTransportException; ++ ++import com.google.common.base.Preconditions; ++ ++/** ++ * Mocket - a Mock Socket ++ *

++ * Implements a bi-directional client-server transport in memory, using two FIFO queues. The output stream of the client is wired to the input stream of the ++ * server, and the output stream of the server is wired to the input stream of the client. ++ */ ++public class Mocket { ++ ++ private final TTransport clientTransport; ++ private final TServerTransport serverTransport; ++ private final AtomicBoolean closed = new AtomicBoolean(false); ++ ++ public Mocket() { ++ Buffer serverQueue = new Buffer(); ++ Buffer clientQueue = new Buffer(); ++ // wire up the two queues to each other ++ clientTransport = new MocketTransport(clientQueue, serverQueue); ++ serverTransport = new MocketServerTransport(new MocketTransport(serverQueue, clientQueue)); ++ ++ } ++ ++ public TServerTransport getServerTransport() { ++ return serverTransport; ++ } ++ ++ public TTransport getClientTransport() { ++ return clientTransport; ++ } ++ ++ private boolean isMocketClosed() { ++ return closed.get(); ++ } ++ ++ private void closeMocket() { ++ closed.set(true); ++ } ++ ++ private class Buffer { ++ ++ private final LinkedBlockingQueue queue = new LinkedBlockingQueue<>(); ++ ++ public void write(int b) { ++ queue.add(b); ++ } ++ ++ public void write(byte[] buf, int off, int len) { ++ Objects.requireNonNull(buf); ++ Preconditions.checkPositionIndexes(off, off + len, buf.length); ++ if (len == 0) { ++ return; ++ } ++ for (int i = 0; i < len; i++) { ++ write(buf[off + i]); ++ } ++ } ++ ++ public int read() { ++ Integer item; ++ // item = queue.take(); ++ // loop below makes sure we don't block indefinitely ++ while (!isMocketClosed()) { ++ try { ++ item = queue.poll(10, TimeUnit.MILLISECONDS); ++ } catch (InterruptedException e) { ++ // reset interrupt flag before returning ++ Thread.currentThread().interrupt(); ++ closeMocket(); ++ return -1; ++ } ++ // null means the timeout was reached ++ if (item != null) { ++ return item; ++ } ++ } ++ return -1; ++ } ++ ++ public int read(byte[] buf, int off, int len) { ++ Objects.requireNonNull(buf); ++ Preconditions.checkPositionIndexes(off, off + len, buf.length); ++ if (len == 0) { ++ return 0; ++ } ++ int c = read(); ++ if (c == -1) { ++ return -1; ++ } ++ buf[off] = (byte) c; ++ ++ int i; ++ for (i = 1; i < len; i++) { ++ c = read(); ++ if (c == -1) { ++ break; ++ } ++ buf[off + i] = (byte) c; ++ } ++ return i; ++ } ++ ++ } ++ ++ private class MocketServerTransport extends TServerTransport { ++ ++ private final MocketTransport servTrans; ++ ++ public MocketServerTransport(MocketTransport mocketTransport) { ++ servTrans = mocketTransport; ++ } ++ ++ @Override ++ public void listen() throws TTransportException {} ++ ++ @Override ++ public void close() { ++ acceptImpl().close(); ++ } ++ ++ @Override ++ protected TTransport acceptImpl() { ++ return servTrans; ++ } ++ ++ @Override ++ public void interrupt() { ++ close(); ++ } ++ ++ } ++ ++ private class MocketTransport extends TTransport { ++ ++ private final Buffer input; ++ private final Buffer output; ++ ++ private MocketTransport(Buffer input, Buffer output) { ++ this.input = input; ++ this.output = output; ++ } ++ ++ @Override ++ public void write(byte[] buf, int off, int len) throws TTransportException { ++ output.write(buf, off, len); ++ } ++ ++ @Override ++ public int read(byte[] buf, int off, int len) throws TTransportException { ++ return input.read(buf, off, len); ++ } ++ ++ @Override ++ public void open() throws TTransportException {} ++ ++ @Override ++ public boolean isOpen() { ++ return !isMocketClosed(); ++ } ++ ++ @Override ++ public void close() { ++ closeMocket(); ++ } ++ } ++ ++} +diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceHandler.java b/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceHandler.java +new file mode 100644 +index 0000000..02db55c +--- /dev/null ++++ b/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceHandler.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.accumulo.test.rpc; ++ ++import org.apache.accumulo.test.rpc.thrift.SimpleThriftService; ++import org.apache.thrift.TException; ++ ++public class SimpleThriftServiceHandler implements SimpleThriftService.Iface { ++ ++ private void setProp(String method, String value) { ++ System.setProperty(this.getClass().getSimpleName() + "." + method, value); ++ } ++ ++ @Override ++ public String echoFail(String value) throws TException { ++ setProp("echoFail", value); ++ throw new TException(new UnsupportedOperationException(value)); ++ } ++ ++ @Override ++ public String echoRuntimeFail(String value) { ++ setProp("echoRuntimeFail", value); ++ throw new UnsupportedOperationException(value); ++ } ++ ++ @Override ++ public String echoPass(String value) { ++ setProp("echoPass", value); ++ return value; ++ } ++ ++ @Override ++ public void onewayFail(String value) throws TException { ++ setProp("onewayFail", value); ++ throw new TException(new UnsupportedOperationException(value)); ++ } ++ ++ @Override ++ public void onewayRuntimeFail(String value) { ++ setProp("onewayRuntimeFail", value); ++ throw new UnsupportedOperationException(value); ++ } ++ ++ @Override ++ public void onewayPass(String value) { ++ setProp("onewayPass", value); ++ } ++ ++} +diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceRunner.java b/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceRunner.java +new file mode 100644 +index 0000000..f2865c2 +--- /dev/null ++++ b/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceRunner.java +@@ -0,0 +1,75 @@ ++/* ++ * 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.accumulo.test.rpc; ++ ++import org.apache.accumulo.server.rpc.RpcWrapper; ++import org.apache.accumulo.test.rpc.thrift.SimpleThriftService; ++import org.apache.thrift.protocol.TBinaryProtocol; ++import org.apache.thrift.server.TServer; ++import org.apache.thrift.server.TSimpleServer; ++ ++/** ++ * A utility for starting a simple thrift server, and providing a corresponding client for in-memory testing of thrift behavior ++ */ ++public class SimpleThriftServiceRunner { ++ ++ private SimpleThriftServiceHandler handler = new SimpleThriftServiceHandler(); ++ ++ private final Mocket mocket; ++ private final Thread serviceThread; ++ private final TServer server; ++ ++ public SimpleThriftServiceRunner(String threadName, boolean useWrapper) { ++ this.mocket = new Mocket(); ++ this.server = createServer(useWrapper); ++ this.serviceThread = new Thread(() -> server.serve(), threadName); ++ } ++ ++ public void startService() { ++ serviceThread.start(); ++ } ++ ++ public SimpleThriftServiceHandler handler() { ++ return handler; ++ } ++ ++ public SimpleThriftService.Client client() { ++ return new SimpleThriftService.Client(new TBinaryProtocol(mocket.getClientTransport())); ++ } ++ ++ private TServer createServer(boolean useWrapper) { ++ TServer.Args args = new TServer.Args(mocket.getServerTransport()); ++ SimpleThriftService.Iface actualHandler = handler; ++ if (useWrapper) { ++ actualHandler = RpcWrapper. service(handler); ++ } ++ args.processor(new SimpleThriftService.Processor<>(actualHandler)); ++ args.protocolFactory(new TBinaryProtocol.Factory()); ++ return new TSimpleServer(args); ++ } ++ ++ public void stopService() { ++ server.stop(); ++ try { ++ serviceThread.join(); ++ } catch (InterruptedException e) { ++ // re-set interrupt flag ++ Thread.currentThread().interrupt(); ++ } ++ } ++ ++} +diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/ThriftBehaviorIT.java b/test/src/main/java/org/apache/accumulo/test/rpc/ThriftBehaviorIT.java +new file mode 100644 +index 0000000..ee6fa08 +--- /dev/null ++++ b/test/src/main/java/org/apache/accumulo/test/rpc/ThriftBehaviorIT.java +@@ -0,0 +1,193 @@ ++/* ++ * 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.accumulo.test.rpc; ++ ++import java.util.Arrays; ++import java.util.HashMap; ++import java.util.Map; ++import java.util.concurrent.TimeUnit; ++ ++import org.apache.accumulo.test.categories.SunnyDayTests; ++import org.apache.accumulo.test.rpc.thrift.SimpleThriftService; ++import org.apache.log4j.Level; ++import org.apache.log4j.Logger; ++import org.apache.thrift.ProcessFunction; ++import org.apache.thrift.TApplicationException; ++import org.apache.thrift.TException; ++import org.apache.thrift.server.TSimpleServer; ++import org.hamcrest.core.IsInstanceOf; ++import org.junit.After; ++import org.junit.Assert; ++import org.junit.Before; ++import org.junit.Rule; ++import org.junit.Test; ++import org.junit.experimental.categories.Category; ++import org.junit.rules.ExpectedException; ++import org.junit.rules.TestName; ++import org.junit.rules.Timeout; ++ ++@Category(SunnyDayTests.class) ++public class ThriftBehaviorIT { ++ ++ @Rule ++ public Timeout timeout = new Timeout(5, TimeUnit.SECONDS); ++ ++ @Rule ++ public TestName testName = new TestName(); ++ ++ @Rule ++ public ExpectedException exception = ExpectedException.none(); ++ ++ private SimpleThriftService.Client client; ++ private SimpleThriftServiceHandler handler; ++ private SimpleThriftServiceRunner serviceRunner; ++ private String propName; ++ private Map oldLogLevels = new HashMap<>(); ++ ++ private static final String KITTY_MSG = "🐈 Kitty! 🐈"; ++ ++ // can delete wrapper when tests pass without using it (assuming tests are good enough) ++ private static final boolean USE_RPC_WRAPPER = true; ++ ++ private static final boolean SUPPRESS_SPAMMY_LOGGERS = true; ++ ++ @Before ++ public void createClientAndServer() { ++ Arrays.stream(new Class[] {TSimpleServer.class, ProcessFunction.class}).forEach(spammyClass -> { ++ Logger spammyLogger = Logger.getLogger(spammyClass); ++ oldLogLevels.put(spammyLogger, spammyLogger.getLevel()); ++ if (SUPPRESS_SPAMMY_LOGGERS) { ++ spammyLogger.setLevel(Level.OFF); ++ } ++ }); ++ ++ String threadName = ThriftBehaviorIT.class.getSimpleName() + "." + testName.getMethodName(); ++ serviceRunner = new SimpleThriftServiceRunner(threadName, USE_RPC_WRAPPER); ++ serviceRunner.startService(); ++ client = serviceRunner.client(); ++ handler = serviceRunner.handler(); ++ ++ propName = testName.getMethodName(); ++ if (propName.endsWith("Handler")) { ++ propName = propName.substring(0, propName.length() - 7); ++ } ++ propName = SimpleThriftServiceHandler.class.getSimpleName() + "." + propName; ++ ++ // make sure the property is reset before the test runs ++ System.setProperty(propName, "-"); ++ Assert.assertEquals("-", System.getProperty(propName)); ++ } ++ ++ @After ++ public void shutdownServer() { ++ serviceRunner.stopService(); ++ ++ oldLogLevels.forEach((spammyLogger, oldLevel) -> { ++ spammyLogger.setLevel(oldLevel); ++ }); ++ ++ // make sure the method was actually executed by the service handler ++ Assert.assertEquals(KITTY_MSG, System.getProperty(propName)); ++ } ++ ++ @Test ++ public void echoFailHandler() throws TException { ++ exception.expect(TException.class); ++ exception.expectCause(IsInstanceOf.instanceOf(UnsupportedOperationException.class)); ++ handler.echoFail(KITTY_MSG); ++ } ++ ++ @Test ++ public void echoFail() throws TException { ++ try { ++ client.echoFail(KITTY_MSG); ++ Assert.fail("Thrift client did not throw an expected exception"); ++ } catch (Exception e) { ++ Assert.assertEquals(TApplicationException.class.getName(), e.getClass().getName()); ++ } ++ // verify normal two-way method still passes using same client ++ echoPass(); ++ } ++ ++ @Test ++ public void echoRuntimeFailHandler() throws TException { ++ exception.expect(UnsupportedOperationException.class); ++ handler.echoRuntimeFail(KITTY_MSG); ++ } ++ ++ @Test ++ public void echoRuntimeFail() throws TException { ++ try { ++ client.echoRuntimeFail(KITTY_MSG); ++ Assert.fail("Thrift client did not throw an expected exception"); ++ } catch (Exception e) { ++ Assert.assertEquals(TApplicationException.class.getName(), e.getClass().getName()); ++ } ++ // verify normal two-way method still passes using same client ++ echoPass(); ++ } ++ ++ @Test ++ public void echoPassHandler() { ++ Assert.assertEquals(KITTY_MSG, handler.echoPass(KITTY_MSG)); ++ } ++ ++ @Test ++ public void echoPass() throws TException { ++ Assert.assertEquals(KITTY_MSG, client.echoPass(KITTY_MSG)); ++ } ++ ++ @Test ++ public void onewayFailHandler() throws TException { ++ exception.expect(TException.class); ++ exception.expectCause(IsInstanceOf.instanceOf(UnsupportedOperationException.class)); ++ handler.onewayFail(KITTY_MSG); ++ } ++ ++ @Test ++ public void onewayFail() throws TException { ++ client.onewayFail(KITTY_MSG); ++ // verify normal two-way method still passes using same client ++ echoPass(); ++ } ++ ++ @Test ++ public void onewayRuntimeFailHandler() throws TException { ++ exception.expect(UnsupportedOperationException.class); ++ handler.onewayRuntimeFail(KITTY_MSG); ++ } ++ ++ @Test ++ public void onewayRuntimeFail() throws TException { ++ client.onewayRuntimeFail(KITTY_MSG); ++ // verify normal two-way method still passes using same client ++ echoPass(); ++ } ++ ++ @Test ++ public void onewayPassHandler() { ++ handler.onewayPass(KITTY_MSG); ++ } ++ ++ @Test ++ public void onewayPass() throws TException { ++ client.onewayPass(KITTY_MSG); ++ // verify normal two-way method still passes using same client ++ echoPass(); ++ } ++ ++} +diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/thrift/SimpleThriftService.java b/test/src/main/java/org/apache/accumulo/test/rpc/thrift/SimpleThriftService.java +new file mode 100644 +index 0000000..d76a789 +--- /dev/null ++++ b/test/src/main/java/org/apache/accumulo/test/rpc/thrift/SimpleThriftService.java +@@ -0,0 +1,4103 @@ ++/* ++ * 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. ++ */ ++/** ++ * Autogenerated by Thrift Compiler (0.10.0) ++ * ++ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING ++ * @generated ++ */ ++package org.apache.accumulo.test.rpc.thrift; ++ ++@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) ++@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") ++public class SimpleThriftService { ++ ++ public interface Iface { ++ ++ public java.lang.String echoPass(java.lang.String value) throws org.apache.thrift.TException; ++ ++ public void onewayPass(java.lang.String value) throws org.apache.thrift.TException; ++ ++ public java.lang.String echoFail(java.lang.String value) throws org.apache.thrift.TException; ++ ++ public void onewayFail(java.lang.String value) throws org.apache.thrift.TException; ++ ++ public java.lang.String echoRuntimeFail(java.lang.String value) throws org.apache.thrift.TException; ++ ++ public void onewayRuntimeFail(java.lang.String value) throws org.apache.thrift.TException; ++ ++ } ++ ++ public interface AsyncIface { ++ ++ public void echoPass(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; ++ ++ public void onewayPass(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; ++ ++ public void echoFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; ++ ++ public void onewayFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; ++ ++ public void echoRuntimeFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; ++ ++ public void onewayRuntimeFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; ++ ++ } ++ ++ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface { ++ public static class Factory implements org.apache.thrift.TServiceClientFactory { ++ public Factory() {} ++ public Client getClient(org.apache.thrift.protocol.TProtocol prot) { ++ return new Client(prot); ++ } ++ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { ++ return new Client(iprot, oprot); ++ } ++ } ++ ++ public Client(org.apache.thrift.protocol.TProtocol prot) ++ { ++ super(prot, prot); ++ } ++ ++ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { ++ super(iprot, oprot); ++ } ++ ++ public java.lang.String echoPass(java.lang.String value) throws org.apache.thrift.TException ++ { ++ send_echoPass(value); ++ return recv_echoPass(); ++ } ++ ++ public void send_echoPass(java.lang.String value) throws org.apache.thrift.TException ++ { ++ echoPass_args args = new echoPass_args(); ++ args.setValue(value); ++ sendBase("echoPass", args); ++ } ++ ++ public java.lang.String recv_echoPass() throws org.apache.thrift.TException ++ { ++ echoPass_result result = new echoPass_result(); ++ receiveBase(result, "echoPass"); ++ if (result.isSetSuccess()) { ++ return result.success; ++ } ++ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "echoPass failed: unknown result"); ++ } ++ ++ public void onewayPass(java.lang.String value) throws org.apache.thrift.TException ++ { ++ send_onewayPass(value); ++ } ++ ++ public void send_onewayPass(java.lang.String value) throws org.apache.thrift.TException ++ { ++ onewayPass_args args = new onewayPass_args(); ++ args.setValue(value); ++ sendBaseOneway("onewayPass", args); ++ } ++ ++ public java.lang.String echoFail(java.lang.String value) throws org.apache.thrift.TException ++ { ++ send_echoFail(value); ++ return recv_echoFail(); ++ } ++ ++ public void send_echoFail(java.lang.String value) throws org.apache.thrift.TException ++ { ++ echoFail_args args = new echoFail_args(); ++ args.setValue(value); ++ sendBase("echoFail", args); ++ } ++ ++ public java.lang.String recv_echoFail() throws org.apache.thrift.TException ++ { ++ echoFail_result result = new echoFail_result(); ++ receiveBase(result, "echoFail"); ++ if (result.isSetSuccess()) { ++ return result.success; ++ } ++ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "echoFail failed: unknown result"); ++ } ++ ++ public void onewayFail(java.lang.String value) throws org.apache.thrift.TException ++ { ++ send_onewayFail(value); ++ } ++ ++ public void send_onewayFail(java.lang.String value) throws org.apache.thrift.TException ++ { ++ onewayFail_args args = new onewayFail_args(); ++ args.setValue(value); ++ sendBaseOneway("onewayFail", args); ++ } ++ ++ public java.lang.String echoRuntimeFail(java.lang.String value) throws org.apache.thrift.TException ++ { ++ send_echoRuntimeFail(value); ++ return recv_echoRuntimeFail(); ++ } ++ ++ public void send_echoRuntimeFail(java.lang.String value) throws org.apache.thrift.TException ++ { ++ echoRuntimeFail_args args = new echoRuntimeFail_args(); ++ args.setValue(value); ++ sendBase("echoRuntimeFail", args); ++ } ++ ++ public java.lang.String recv_echoRuntimeFail() throws org.apache.thrift.TException ++ { ++ echoRuntimeFail_result result = new echoRuntimeFail_result(); ++ receiveBase(result, "echoRuntimeFail"); ++ if (result.isSetSuccess()) { ++ return result.success; ++ } ++ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "echoRuntimeFail failed: unknown result"); ++ } ++ ++ public void onewayRuntimeFail(java.lang.String value) throws org.apache.thrift.TException ++ { ++ send_onewayRuntimeFail(value); ++ } ++ ++ public void send_onewayRuntimeFail(java.lang.String value) throws org.apache.thrift.TException ++ { ++ onewayRuntimeFail_args args = new onewayRuntimeFail_args(); ++ args.setValue(value); ++ sendBaseOneway("onewayRuntimeFail", args); ++ } ++ ++ } ++ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { ++ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { ++ private org.apache.thrift.async.TAsyncClientManager clientManager; ++ private org.apache.thrift.protocol.TProtocolFactory protocolFactory; ++ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { ++ this.clientManager = clientManager; ++ this.protocolFactory = protocolFactory; ++ } ++ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { ++ return new AsyncClient(protocolFactory, clientManager, transport); ++ } ++ } ++ ++ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { ++ super(protocolFactory, clientManager, transport); ++ } ++ ++ public void echoPass(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ checkReady(); ++ echoPass_call method_call = new echoPass_call(value, resultHandler, this, ___protocolFactory, ___transport); ++ this.___currentMethod = method_call; ++ ___manager.call(method_call); ++ } ++ ++ public static class echoPass_call extends org.apache.thrift.async.TAsyncMethodCall { ++ private java.lang.String value; ++ public echoPass_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { ++ super(client, protocolFactory, transport, resultHandler, false); ++ this.value = value; ++ } ++ ++ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { ++ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("echoPass", org.apache.thrift.protocol.TMessageType.CALL, 0)); ++ echoPass_args args = new echoPass_args(); ++ args.setValue(value); ++ args.write(prot); ++ prot.writeMessageEnd(); ++ } ++ ++ public java.lang.String getResult() throws org.apache.thrift.TException { ++ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { ++ throw new java.lang.IllegalStateException("Method call not finished!"); ++ } ++ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); ++ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); ++ return (new Client(prot)).recv_echoPass(); ++ } ++ } ++ ++ public void onewayPass(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ checkReady(); ++ onewayPass_call method_call = new onewayPass_call(value, resultHandler, this, ___protocolFactory, ___transport); ++ this.___currentMethod = method_call; ++ ___manager.call(method_call); ++ } ++ ++ public static class onewayPass_call extends org.apache.thrift.async.TAsyncMethodCall { ++ private java.lang.String value; ++ public onewayPass_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { ++ super(client, protocolFactory, transport, resultHandler, true); ++ this.value = value; ++ } ++ ++ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { ++ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayPass", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); ++ onewayPass_args args = new onewayPass_args(); ++ args.setValue(value); ++ args.write(prot); ++ prot.writeMessageEnd(); ++ } ++ ++ public Void getResult() throws org.apache.thrift.TException { ++ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { ++ throw new java.lang.IllegalStateException("Method call not finished!"); ++ } ++ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); ++ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); ++ return null; ++ } ++ } ++ ++ public void echoFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ checkReady(); ++ echoFail_call method_call = new echoFail_call(value, resultHandler, this, ___protocolFactory, ___transport); ++ this.___currentMethod = method_call; ++ ___manager.call(method_call); ++ } ++ ++ public static class echoFail_call extends org.apache.thrift.async.TAsyncMethodCall { ++ private java.lang.String value; ++ public echoFail_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { ++ super(client, protocolFactory, transport, resultHandler, false); ++ this.value = value; ++ } ++ ++ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { ++ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("echoFail", org.apache.thrift.protocol.TMessageType.CALL, 0)); ++ echoFail_args args = new echoFail_args(); ++ args.setValue(value); ++ args.write(prot); ++ prot.writeMessageEnd(); ++ } ++ ++ public java.lang.String getResult() throws org.apache.thrift.TException { ++ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { ++ throw new java.lang.IllegalStateException("Method call not finished!"); ++ } ++ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); ++ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); ++ return (new Client(prot)).recv_echoFail(); ++ } ++ } ++ ++ public void onewayFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ checkReady(); ++ onewayFail_call method_call = new onewayFail_call(value, resultHandler, this, ___protocolFactory, ___transport); ++ this.___currentMethod = method_call; ++ ___manager.call(method_call); ++ } ++ ++ public static class onewayFail_call extends org.apache.thrift.async.TAsyncMethodCall { ++ private java.lang.String value; ++ public onewayFail_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { ++ super(client, protocolFactory, transport, resultHandler, true); ++ this.value = value; ++ } ++ ++ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { ++ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayFail", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); ++ onewayFail_args args = new onewayFail_args(); ++ args.setValue(value); ++ args.write(prot); ++ prot.writeMessageEnd(); ++ } ++ ++ public Void getResult() throws org.apache.thrift.TException { ++ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { ++ throw new java.lang.IllegalStateException("Method call not finished!"); ++ } ++ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); ++ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); ++ return null; ++ } ++ } ++ ++ public void echoRuntimeFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ checkReady(); ++ echoRuntimeFail_call method_call = new echoRuntimeFail_call(value, resultHandler, this, ___protocolFactory, ___transport); ++ this.___currentMethod = method_call; ++ ___manager.call(method_call); ++ } ++ ++ public static class echoRuntimeFail_call extends org.apache.thrift.async.TAsyncMethodCall { ++ private java.lang.String value; ++ public echoRuntimeFail_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { ++ super(client, protocolFactory, transport, resultHandler, false); ++ this.value = value; ++ } ++ ++ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { ++ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("echoRuntimeFail", org.apache.thrift.protocol.TMessageType.CALL, 0)); ++ echoRuntimeFail_args args = new echoRuntimeFail_args(); ++ args.setValue(value); ++ args.write(prot); ++ prot.writeMessageEnd(); ++ } ++ ++ public java.lang.String getResult() throws org.apache.thrift.TException { ++ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { ++ throw new java.lang.IllegalStateException("Method call not finished!"); ++ } ++ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); ++ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); ++ return (new Client(prot)).recv_echoRuntimeFail(); ++ } ++ } ++ ++ public void onewayRuntimeFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ checkReady(); ++ onewayRuntimeFail_call method_call = new onewayRuntimeFail_call(value, resultHandler, this, ___protocolFactory, ___transport); ++ this.___currentMethod = method_call; ++ ___manager.call(method_call); ++ } ++ ++ public static class onewayRuntimeFail_call extends org.apache.thrift.async.TAsyncMethodCall { ++ private java.lang.String value; ++ public onewayRuntimeFail_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { ++ super(client, protocolFactory, transport, resultHandler, true); ++ this.value = value; ++ } ++ ++ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { ++ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayRuntimeFail", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); ++ onewayRuntimeFail_args args = new onewayRuntimeFail_args(); ++ args.setValue(value); ++ args.write(prot); ++ prot.writeMessageEnd(); ++ } ++ ++ public Void getResult() throws org.apache.thrift.TException { ++ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { ++ throw new java.lang.IllegalStateException("Method call not finished!"); ++ } ++ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); ++ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); ++ return null; ++ } ++ } ++ ++ } ++ ++ public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { ++ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); ++ public Processor(I iface) { ++ super(iface, getProcessMap(new java.util.HashMap>())); ++ } ++ ++ protected Processor(I iface, java.util.Map> processMap) { ++ super(iface, getProcessMap(processMap)); ++ } ++ ++ private static java.util.Map> getProcessMap(java.util.Map> processMap) { ++ processMap.put("echoPass", new echoPass()); ++ processMap.put("onewayPass", new onewayPass()); ++ processMap.put("echoFail", new echoFail()); ++ processMap.put("onewayFail", new onewayFail()); ++ processMap.put("echoRuntimeFail", new echoRuntimeFail()); ++ processMap.put("onewayRuntimeFail", new onewayRuntimeFail()); ++ return processMap; ++ } ++ ++ public static class echoPass extends org.apache.thrift.ProcessFunction { ++ public echoPass() { ++ super("echoPass"); ++ } ++ ++ public echoPass_args getEmptyArgsInstance() { ++ return new echoPass_args(); ++ } ++ ++ protected boolean isOneway() { ++ return false; ++ } ++ ++ public echoPass_result getResult(I iface, echoPass_args args) throws org.apache.thrift.TException { ++ echoPass_result result = new echoPass_result(); ++ result.success = iface.echoPass(args.value); ++ return result; ++ } ++ } ++ ++ public static class onewayPass extends org.apache.thrift.ProcessFunction { ++ public onewayPass() { ++ super("onewayPass"); ++ } ++ ++ public onewayPass_args getEmptyArgsInstance() { ++ return new onewayPass_args(); ++ } ++ ++ protected boolean isOneway() { ++ return true; ++ } ++ ++ public org.apache.thrift.TBase getResult(I iface, onewayPass_args args) throws org.apache.thrift.TException { ++ iface.onewayPass(args.value); ++ return null; ++ } ++ } ++ ++ public static class echoFail extends org.apache.thrift.ProcessFunction { ++ public echoFail() { ++ super("echoFail"); ++ } ++ ++ public echoFail_args getEmptyArgsInstance() { ++ return new echoFail_args(); ++ } ++ ++ protected boolean isOneway() { ++ return false; ++ } ++ ++ public echoFail_result getResult(I iface, echoFail_args args) throws org.apache.thrift.TException { ++ echoFail_result result = new echoFail_result(); ++ result.success = iface.echoFail(args.value); ++ return result; ++ } ++ } ++ ++ public static class onewayFail extends org.apache.thrift.ProcessFunction { ++ public onewayFail() { ++ super("onewayFail"); ++ } ++ ++ public onewayFail_args getEmptyArgsInstance() { ++ return new onewayFail_args(); ++ } ++ ++ protected boolean isOneway() { ++ return true; ++ } ++ ++ public org.apache.thrift.TBase getResult(I iface, onewayFail_args args) throws org.apache.thrift.TException { ++ iface.onewayFail(args.value); ++ return null; ++ } ++ } ++ ++ public static class echoRuntimeFail extends org.apache.thrift.ProcessFunction { ++ public echoRuntimeFail() { ++ super("echoRuntimeFail"); ++ } ++ ++ public echoRuntimeFail_args getEmptyArgsInstance() { ++ return new echoRuntimeFail_args(); ++ } ++ ++ protected boolean isOneway() { ++ return false; ++ } ++ ++ public echoRuntimeFail_result getResult(I iface, echoRuntimeFail_args args) throws org.apache.thrift.TException { ++ echoRuntimeFail_result result = new echoRuntimeFail_result(); ++ result.success = iface.echoRuntimeFail(args.value); ++ return result; ++ } ++ } ++ ++ public static class onewayRuntimeFail extends org.apache.thrift.ProcessFunction { ++ public onewayRuntimeFail() { ++ super("onewayRuntimeFail"); ++ } ++ ++ public onewayRuntimeFail_args getEmptyArgsInstance() { ++ return new onewayRuntimeFail_args(); ++ } ++ ++ protected boolean isOneway() { ++ return true; ++ } ++ ++ public org.apache.thrift.TBase getResult(I iface, onewayRuntimeFail_args args) throws org.apache.thrift.TException { ++ iface.onewayRuntimeFail(args.value); ++ return null; ++ } ++ } ++ ++ } ++ ++ public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { ++ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); ++ public AsyncProcessor(I iface) { ++ super(iface, getProcessMap(new java.util.HashMap>())); ++ } ++ ++ protected AsyncProcessor(I iface, java.util.Map> processMap) { ++ super(iface, getProcessMap(processMap)); ++ } ++ ++ private static java.util.Map> getProcessMap(java.util.Map> processMap) { ++ processMap.put("echoPass", new echoPass()); ++ processMap.put("onewayPass", new onewayPass()); ++ processMap.put("echoFail", new echoFail()); ++ processMap.put("onewayFail", new onewayFail()); ++ processMap.put("echoRuntimeFail", new echoRuntimeFail()); ++ processMap.put("onewayRuntimeFail", new onewayRuntimeFail()); ++ return processMap; ++ } ++ ++ public static class echoPass extends org.apache.thrift.AsyncProcessFunction { ++ public echoPass() { ++ super("echoPass"); ++ } ++ ++ public echoPass_args getEmptyArgsInstance() { ++ return new echoPass_args(); ++ } ++ ++ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { ++ final org.apache.thrift.AsyncProcessFunction fcall = this; ++ return new org.apache.thrift.async.AsyncMethodCallback() { ++ public void onComplete(java.lang.String o) { ++ echoPass_result result = new echoPass_result(); ++ result.success = o; ++ try { ++ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); ++ } catch (org.apache.thrift.transport.TTransportException e) { ++ _LOGGER.error("TTransportException writing to internal frame buffer", e); ++ fb.close(); ++ } catch (java.lang.Exception e) { ++ _LOGGER.error("Exception writing to internal frame buffer", e); ++ onError(e); ++ } ++ } ++ public void onError(java.lang.Exception e) { ++ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; ++ org.apache.thrift.TSerializable msg; ++ echoPass_result result = new echoPass_result(); ++ if (e instanceof org.apache.thrift.transport.TTransportException) { ++ _LOGGER.error("TTransportException inside handler", e); ++ fb.close(); ++ return; ++ } else if (e instanceof org.apache.thrift.TApplicationException) { ++ _LOGGER.error("TApplicationException inside handler", e); ++ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; ++ msg = (org.apache.thrift.TApplicationException)e; ++ } else { ++ _LOGGER.error("Exception inside handler", e); ++ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; ++ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); ++ } ++ try { ++ fcall.sendResponse(fb,msg,msgType,seqid); ++ } catch (java.lang.Exception ex) { ++ _LOGGER.error("Exception writing to internal frame buffer", ex); ++ fb.close(); ++ } ++ } ++ }; ++ } ++ ++ protected boolean isOneway() { ++ return false; ++ } ++ ++ public void start(I iface, echoPass_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ iface.echoPass(args.value,resultHandler); ++ } ++ } ++ ++ public static class onewayPass extends org.apache.thrift.AsyncProcessFunction { ++ public onewayPass() { ++ super("onewayPass"); ++ } ++ ++ public onewayPass_args getEmptyArgsInstance() { ++ return new onewayPass_args(); ++ } ++ ++ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { ++ final org.apache.thrift.AsyncProcessFunction fcall = this; ++ return new org.apache.thrift.async.AsyncMethodCallback() { ++ public void onComplete(Void o) { ++ } ++ public void onError(java.lang.Exception e) { ++ if (e instanceof org.apache.thrift.transport.TTransportException) { ++ _LOGGER.error("TTransportException inside handler", e); ++ fb.close(); ++ } else { ++ _LOGGER.error("Exception inside oneway handler", e); ++ } ++ } ++ }; ++ } ++ ++ protected boolean isOneway() { ++ return true; ++ } ++ ++ public void start(I iface, onewayPass_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ iface.onewayPass(args.value,resultHandler); ++ } ++ } ++ ++ public static class echoFail extends org.apache.thrift.AsyncProcessFunction { ++ public echoFail() { ++ super("echoFail"); ++ } ++ ++ public echoFail_args getEmptyArgsInstance() { ++ return new echoFail_args(); ++ } ++ ++ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { ++ final org.apache.thrift.AsyncProcessFunction fcall = this; ++ return new org.apache.thrift.async.AsyncMethodCallback() { ++ public void onComplete(java.lang.String o) { ++ echoFail_result result = new echoFail_result(); ++ result.success = o; ++ try { ++ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); ++ } catch (org.apache.thrift.transport.TTransportException e) { ++ _LOGGER.error("TTransportException writing to internal frame buffer", e); ++ fb.close(); ++ } catch (java.lang.Exception e) { ++ _LOGGER.error("Exception writing to internal frame buffer", e); ++ onError(e); ++ } ++ } ++ public void onError(java.lang.Exception e) { ++ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; ++ org.apache.thrift.TSerializable msg; ++ echoFail_result result = new echoFail_result(); ++ if (e instanceof org.apache.thrift.transport.TTransportException) { ++ _LOGGER.error("TTransportException inside handler", e); ++ fb.close(); ++ return; ++ } else if (e instanceof org.apache.thrift.TApplicationException) { ++ _LOGGER.error("TApplicationException inside handler", e); ++ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; ++ msg = (org.apache.thrift.TApplicationException)e; ++ } else { ++ _LOGGER.error("Exception inside handler", e); ++ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; ++ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); ++ } ++ try { ++ fcall.sendResponse(fb,msg,msgType,seqid); ++ } catch (java.lang.Exception ex) { ++ _LOGGER.error("Exception writing to internal frame buffer", ex); ++ fb.close(); ++ } ++ } ++ }; ++ } ++ ++ protected boolean isOneway() { ++ return false; ++ } ++ ++ public void start(I iface, echoFail_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ iface.echoFail(args.value,resultHandler); ++ } ++ } ++ ++ public static class onewayFail extends org.apache.thrift.AsyncProcessFunction { ++ public onewayFail() { ++ super("onewayFail"); ++ } ++ ++ public onewayFail_args getEmptyArgsInstance() { ++ return new onewayFail_args(); ++ } ++ ++ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { ++ final org.apache.thrift.AsyncProcessFunction fcall = this; ++ return new org.apache.thrift.async.AsyncMethodCallback() { ++ public void onComplete(Void o) { ++ } ++ public void onError(java.lang.Exception e) { ++ if (e instanceof org.apache.thrift.transport.TTransportException) { ++ _LOGGER.error("TTransportException inside handler", e); ++ fb.close(); ++ } else { ++ _LOGGER.error("Exception inside oneway handler", e); ++ } ++ } ++ }; ++ } ++ ++ protected boolean isOneway() { ++ return true; ++ } ++ ++ public void start(I iface, onewayFail_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ iface.onewayFail(args.value,resultHandler); ++ } ++ } ++ ++ public static class echoRuntimeFail extends org.apache.thrift.AsyncProcessFunction { ++ public echoRuntimeFail() { ++ super("echoRuntimeFail"); ++ } ++ ++ public echoRuntimeFail_args getEmptyArgsInstance() { ++ return new echoRuntimeFail_args(); ++ } ++ ++ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { ++ final org.apache.thrift.AsyncProcessFunction fcall = this; ++ return new org.apache.thrift.async.AsyncMethodCallback() { ++ public void onComplete(java.lang.String o) { ++ echoRuntimeFail_result result = new echoRuntimeFail_result(); ++ result.success = o; ++ try { ++ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); ++ } catch (org.apache.thrift.transport.TTransportException e) { ++ _LOGGER.error("TTransportException writing to internal frame buffer", e); ++ fb.close(); ++ } catch (java.lang.Exception e) { ++ _LOGGER.error("Exception writing to internal frame buffer", e); ++ onError(e); ++ } ++ } ++ public void onError(java.lang.Exception e) { ++ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; ++ org.apache.thrift.TSerializable msg; ++ echoRuntimeFail_result result = new echoRuntimeFail_result(); ++ if (e instanceof org.apache.thrift.transport.TTransportException) { ++ _LOGGER.error("TTransportException inside handler", e); ++ fb.close(); ++ return; ++ } else if (e instanceof org.apache.thrift.TApplicationException) { ++ _LOGGER.error("TApplicationException inside handler", e); ++ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; ++ msg = (org.apache.thrift.TApplicationException)e; ++ } else { ++ _LOGGER.error("Exception inside handler", e); ++ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; ++ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); ++ } ++ try { ++ fcall.sendResponse(fb,msg,msgType,seqid); ++ } catch (java.lang.Exception ex) { ++ _LOGGER.error("Exception writing to internal frame buffer", ex); ++ fb.close(); ++ } ++ } ++ }; ++ } ++ ++ protected boolean isOneway() { ++ return false; ++ } ++ ++ public void start(I iface, echoRuntimeFail_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ iface.echoRuntimeFail(args.value,resultHandler); ++ } ++ } ++ ++ public static class onewayRuntimeFail extends org.apache.thrift.AsyncProcessFunction { ++ public onewayRuntimeFail() { ++ super("onewayRuntimeFail"); ++ } ++ ++ public onewayRuntimeFail_args getEmptyArgsInstance() { ++ return new onewayRuntimeFail_args(); ++ } ++ ++ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { ++ final org.apache.thrift.AsyncProcessFunction fcall = this; ++ return new org.apache.thrift.async.AsyncMethodCallback() { ++ public void onComplete(Void o) { ++ } ++ public void onError(java.lang.Exception e) { ++ if (e instanceof org.apache.thrift.transport.TTransportException) { ++ _LOGGER.error("TTransportException inside handler", e); ++ fb.close(); ++ } else { ++ _LOGGER.error("Exception inside oneway handler", e); ++ } ++ } ++ }; ++ } ++ ++ protected boolean isOneway() { ++ return true; ++ } ++ ++ public void start(I iface, onewayRuntimeFail_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { ++ iface.onewayRuntimeFail(args.value,resultHandler); ++ } ++ } ++ ++ } ++ ++ public static class echoPass_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoPass_args"); ++ ++ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoPass_argsStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoPass_argsTupleSchemeFactory(); ++ ++ public java.lang.String value; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ VALUE((short)1, "value"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 1: // VALUE ++ return VALUE; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoPass_args.class, metaDataMap); ++ } ++ ++ public echoPass_args() { ++ } ++ ++ public echoPass_args( ++ java.lang.String value) ++ { ++ this(); ++ this.value = value; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public echoPass_args(echoPass_args other) { ++ if (other.isSetValue()) { ++ this.value = other.value; ++ } ++ } ++ ++ public echoPass_args deepCopy() { ++ return new echoPass_args(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.value = null; ++ } ++ ++ public java.lang.String getValue() { ++ return this.value; ++ } ++ ++ public echoPass_args setValue(java.lang.String value) { ++ this.value = value; ++ return this; ++ } ++ ++ public void unsetValue() { ++ this.value = null; ++ } ++ ++ /** Returns true if field value is set (has been assigned a value) and false otherwise */ ++ public boolean isSetValue() { ++ return this.value != null; ++ } ++ ++ public void setValueIsSet(boolean value) { ++ if (!value) { ++ this.value = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case VALUE: ++ if (value == null) { ++ unsetValue(); ++ } else { ++ setValue((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case VALUE: ++ return getValue(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case VALUE: ++ return isSetValue(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof echoPass_args) ++ return this.equals((echoPass_args)that); ++ return false; ++ } ++ ++ public boolean equals(echoPass_args that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_value = true && this.isSetValue(); ++ boolean that_present_value = true && that.isSetValue(); ++ if (this_present_value || that_present_value) { ++ if (!(this_present_value && that_present_value)) ++ return false; ++ if (!this.value.equals(that.value)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); ++ if (isSetValue()) ++ hashCode = hashCode * 8191 + value.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(echoPass_args other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetValue()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoPass_args("); ++ boolean first = true; ++ ++ sb.append("value:"); ++ if (this.value == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.value); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class echoPass_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoPass_argsStandardScheme getScheme() { ++ return new echoPass_argsStandardScheme(); ++ } ++ } ++ ++ private static class echoPass_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, echoPass_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 1: // VALUE ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, echoPass_args struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.value != null) { ++ oprot.writeFieldBegin(VALUE_FIELD_DESC); ++ oprot.writeString(struct.value); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class echoPass_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoPass_argsTupleScheme getScheme() { ++ return new echoPass_argsTupleScheme(); ++ } ++ } ++ ++ private static class echoPass_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, echoPass_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetValue()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetValue()) { ++ oprot.writeString(struct.value); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, echoPass_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ public static class echoPass_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoPass_result"); ++ ++ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoPass_resultStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoPass_resultTupleSchemeFactory(); ++ ++ public java.lang.String success; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ SUCCESS((short)0, "success"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 0: // SUCCESS ++ return SUCCESS; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoPass_result.class, metaDataMap); ++ } ++ ++ public echoPass_result() { ++ } ++ ++ public echoPass_result( ++ java.lang.String success) ++ { ++ this(); ++ this.success = success; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public echoPass_result(echoPass_result other) { ++ if (other.isSetSuccess()) { ++ this.success = other.success; ++ } ++ } ++ ++ public echoPass_result deepCopy() { ++ return new echoPass_result(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.success = null; ++ } ++ ++ public java.lang.String getSuccess() { ++ return this.success; ++ } ++ ++ public echoPass_result setSuccess(java.lang.String success) { ++ this.success = success; ++ return this; ++ } ++ ++ public void unsetSuccess() { ++ this.success = null; ++ } ++ ++ /** Returns true if field success is set (has been assigned a value) and false otherwise */ ++ public boolean isSetSuccess() { ++ return this.success != null; ++ } ++ ++ public void setSuccessIsSet(boolean value) { ++ if (!value) { ++ this.success = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case SUCCESS: ++ if (value == null) { ++ unsetSuccess(); ++ } else { ++ setSuccess((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case SUCCESS: ++ return getSuccess(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case SUCCESS: ++ return isSetSuccess(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof echoPass_result) ++ return this.equals((echoPass_result)that); ++ return false; ++ } ++ ++ public boolean equals(echoPass_result that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_success = true && this.isSetSuccess(); ++ boolean that_present_success = true && that.isSetSuccess(); ++ if (this_present_success || that_present_success) { ++ if (!(this_present_success && that_present_success)) ++ return false; ++ if (!this.success.equals(that.success)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); ++ if (isSetSuccess()) ++ hashCode = hashCode * 8191 + success.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(echoPass_result other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetSuccess()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoPass_result("); ++ boolean first = true; ++ ++ sb.append("success:"); ++ if (this.success == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.success); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class echoPass_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoPass_resultStandardScheme getScheme() { ++ return new echoPass_resultStandardScheme(); ++ } ++ } ++ ++ private static class echoPass_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, echoPass_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 0: // SUCCESS ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.success = iprot.readString(); ++ struct.setSuccessIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, echoPass_result struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.success != null) { ++ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); ++ oprot.writeString(struct.success); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class echoPass_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoPass_resultTupleScheme getScheme() { ++ return new echoPass_resultTupleScheme(); ++ } ++ } ++ ++ private static class echoPass_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, echoPass_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetSuccess()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetSuccess()) { ++ oprot.writeString(struct.success); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, echoPass_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.success = iprot.readString(); ++ struct.setSuccessIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ public static class onewayPass_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayPass_args"); ++ ++ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayPass_argsStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayPass_argsTupleSchemeFactory(); ++ ++ public java.lang.String value; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ VALUE((short)1, "value"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 1: // VALUE ++ return VALUE; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayPass_args.class, metaDataMap); ++ } ++ ++ public onewayPass_args() { ++ } ++ ++ public onewayPass_args( ++ java.lang.String value) ++ { ++ this(); ++ this.value = value; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public onewayPass_args(onewayPass_args other) { ++ if (other.isSetValue()) { ++ this.value = other.value; ++ } ++ } ++ ++ public onewayPass_args deepCopy() { ++ return new onewayPass_args(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.value = null; ++ } ++ ++ public java.lang.String getValue() { ++ return this.value; ++ } ++ ++ public onewayPass_args setValue(java.lang.String value) { ++ this.value = value; ++ return this; ++ } ++ ++ public void unsetValue() { ++ this.value = null; ++ } ++ ++ /** Returns true if field value is set (has been assigned a value) and false otherwise */ ++ public boolean isSetValue() { ++ return this.value != null; ++ } ++ ++ public void setValueIsSet(boolean value) { ++ if (!value) { ++ this.value = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case VALUE: ++ if (value == null) { ++ unsetValue(); ++ } else { ++ setValue((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case VALUE: ++ return getValue(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case VALUE: ++ return isSetValue(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof onewayPass_args) ++ return this.equals((onewayPass_args)that); ++ return false; ++ } ++ ++ public boolean equals(onewayPass_args that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_value = true && this.isSetValue(); ++ boolean that_present_value = true && that.isSetValue(); ++ if (this_present_value || that_present_value) { ++ if (!(this_present_value && that_present_value)) ++ return false; ++ if (!this.value.equals(that.value)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); ++ if (isSetValue()) ++ hashCode = hashCode * 8191 + value.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(onewayPass_args other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetValue()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("onewayPass_args("); ++ boolean first = true; ++ ++ sb.append("value:"); ++ if (this.value == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.value); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class onewayPass_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public onewayPass_argsStandardScheme getScheme() { ++ return new onewayPass_argsStandardScheme(); ++ } ++ } ++ ++ private static class onewayPass_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, onewayPass_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 1: // VALUE ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, onewayPass_args struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.value != null) { ++ oprot.writeFieldBegin(VALUE_FIELD_DESC); ++ oprot.writeString(struct.value); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class onewayPass_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public onewayPass_argsTupleScheme getScheme() { ++ return new onewayPass_argsTupleScheme(); ++ } ++ } ++ ++ private static class onewayPass_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, onewayPass_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetValue()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetValue()) { ++ oprot.writeString(struct.value); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, onewayPass_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ public static class echoFail_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoFail_args"); ++ ++ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoFail_argsStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoFail_argsTupleSchemeFactory(); ++ ++ public java.lang.String value; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ VALUE((short)1, "value"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 1: // VALUE ++ return VALUE; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoFail_args.class, metaDataMap); ++ } ++ ++ public echoFail_args() { ++ } ++ ++ public echoFail_args( ++ java.lang.String value) ++ { ++ this(); ++ this.value = value; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public echoFail_args(echoFail_args other) { ++ if (other.isSetValue()) { ++ this.value = other.value; ++ } ++ } ++ ++ public echoFail_args deepCopy() { ++ return new echoFail_args(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.value = null; ++ } ++ ++ public java.lang.String getValue() { ++ return this.value; ++ } ++ ++ public echoFail_args setValue(java.lang.String value) { ++ this.value = value; ++ return this; ++ } ++ ++ public void unsetValue() { ++ this.value = null; ++ } ++ ++ /** Returns true if field value is set (has been assigned a value) and false otherwise */ ++ public boolean isSetValue() { ++ return this.value != null; ++ } ++ ++ public void setValueIsSet(boolean value) { ++ if (!value) { ++ this.value = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case VALUE: ++ if (value == null) { ++ unsetValue(); ++ } else { ++ setValue((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case VALUE: ++ return getValue(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case VALUE: ++ return isSetValue(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof echoFail_args) ++ return this.equals((echoFail_args)that); ++ return false; ++ } ++ ++ public boolean equals(echoFail_args that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_value = true && this.isSetValue(); ++ boolean that_present_value = true && that.isSetValue(); ++ if (this_present_value || that_present_value) { ++ if (!(this_present_value && that_present_value)) ++ return false; ++ if (!this.value.equals(that.value)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); ++ if (isSetValue()) ++ hashCode = hashCode * 8191 + value.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(echoFail_args other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetValue()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoFail_args("); ++ boolean first = true; ++ ++ sb.append("value:"); ++ if (this.value == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.value); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class echoFail_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoFail_argsStandardScheme getScheme() { ++ return new echoFail_argsStandardScheme(); ++ } ++ } ++ ++ private static class echoFail_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, echoFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 1: // VALUE ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, echoFail_args struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.value != null) { ++ oprot.writeFieldBegin(VALUE_FIELD_DESC); ++ oprot.writeString(struct.value); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class echoFail_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoFail_argsTupleScheme getScheme() { ++ return new echoFail_argsTupleScheme(); ++ } ++ } ++ ++ private static class echoFail_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, echoFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetValue()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetValue()) { ++ oprot.writeString(struct.value); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, echoFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ public static class echoFail_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoFail_result"); ++ ++ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoFail_resultStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoFail_resultTupleSchemeFactory(); ++ ++ public java.lang.String success; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ SUCCESS((short)0, "success"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 0: // SUCCESS ++ return SUCCESS; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoFail_result.class, metaDataMap); ++ } ++ ++ public echoFail_result() { ++ } ++ ++ public echoFail_result( ++ java.lang.String success) ++ { ++ this(); ++ this.success = success; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public echoFail_result(echoFail_result other) { ++ if (other.isSetSuccess()) { ++ this.success = other.success; ++ } ++ } ++ ++ public echoFail_result deepCopy() { ++ return new echoFail_result(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.success = null; ++ } ++ ++ public java.lang.String getSuccess() { ++ return this.success; ++ } ++ ++ public echoFail_result setSuccess(java.lang.String success) { ++ this.success = success; ++ return this; ++ } ++ ++ public void unsetSuccess() { ++ this.success = null; ++ } ++ ++ /** Returns true if field success is set (has been assigned a value) and false otherwise */ ++ public boolean isSetSuccess() { ++ return this.success != null; ++ } ++ ++ public void setSuccessIsSet(boolean value) { ++ if (!value) { ++ this.success = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case SUCCESS: ++ if (value == null) { ++ unsetSuccess(); ++ } else { ++ setSuccess((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case SUCCESS: ++ return getSuccess(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case SUCCESS: ++ return isSetSuccess(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof echoFail_result) ++ return this.equals((echoFail_result)that); ++ return false; ++ } ++ ++ public boolean equals(echoFail_result that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_success = true && this.isSetSuccess(); ++ boolean that_present_success = true && that.isSetSuccess(); ++ if (this_present_success || that_present_success) { ++ if (!(this_present_success && that_present_success)) ++ return false; ++ if (!this.success.equals(that.success)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); ++ if (isSetSuccess()) ++ hashCode = hashCode * 8191 + success.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(echoFail_result other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetSuccess()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoFail_result("); ++ boolean first = true; ++ ++ sb.append("success:"); ++ if (this.success == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.success); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class echoFail_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoFail_resultStandardScheme getScheme() { ++ return new echoFail_resultStandardScheme(); ++ } ++ } ++ ++ private static class echoFail_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, echoFail_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 0: // SUCCESS ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.success = iprot.readString(); ++ struct.setSuccessIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, echoFail_result struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.success != null) { ++ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); ++ oprot.writeString(struct.success); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class echoFail_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoFail_resultTupleScheme getScheme() { ++ return new echoFail_resultTupleScheme(); ++ } ++ } ++ ++ private static class echoFail_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, echoFail_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetSuccess()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetSuccess()) { ++ oprot.writeString(struct.success); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, echoFail_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.success = iprot.readString(); ++ struct.setSuccessIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ public static class onewayFail_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayFail_args"); ++ ++ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayFail_argsStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayFail_argsTupleSchemeFactory(); ++ ++ public java.lang.String value; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ VALUE((short)1, "value"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 1: // VALUE ++ return VALUE; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayFail_args.class, metaDataMap); ++ } ++ ++ public onewayFail_args() { ++ } ++ ++ public onewayFail_args( ++ java.lang.String value) ++ { ++ this(); ++ this.value = value; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public onewayFail_args(onewayFail_args other) { ++ if (other.isSetValue()) { ++ this.value = other.value; ++ } ++ } ++ ++ public onewayFail_args deepCopy() { ++ return new onewayFail_args(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.value = null; ++ } ++ ++ public java.lang.String getValue() { ++ return this.value; ++ } ++ ++ public onewayFail_args setValue(java.lang.String value) { ++ this.value = value; ++ return this; ++ } ++ ++ public void unsetValue() { ++ this.value = null; ++ } ++ ++ /** Returns true if field value is set (has been assigned a value) and false otherwise */ ++ public boolean isSetValue() { ++ return this.value != null; ++ } ++ ++ public void setValueIsSet(boolean value) { ++ if (!value) { ++ this.value = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case VALUE: ++ if (value == null) { ++ unsetValue(); ++ } else { ++ setValue((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case VALUE: ++ return getValue(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case VALUE: ++ return isSetValue(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof onewayFail_args) ++ return this.equals((onewayFail_args)that); ++ return false; ++ } ++ ++ public boolean equals(onewayFail_args that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_value = true && this.isSetValue(); ++ boolean that_present_value = true && that.isSetValue(); ++ if (this_present_value || that_present_value) { ++ if (!(this_present_value && that_present_value)) ++ return false; ++ if (!this.value.equals(that.value)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); ++ if (isSetValue()) ++ hashCode = hashCode * 8191 + value.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(onewayFail_args other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetValue()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("onewayFail_args("); ++ boolean first = true; ++ ++ sb.append("value:"); ++ if (this.value == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.value); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class onewayFail_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public onewayFail_argsStandardScheme getScheme() { ++ return new onewayFail_argsStandardScheme(); ++ } ++ } ++ ++ private static class onewayFail_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, onewayFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 1: // VALUE ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, onewayFail_args struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.value != null) { ++ oprot.writeFieldBegin(VALUE_FIELD_DESC); ++ oprot.writeString(struct.value); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class onewayFail_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public onewayFail_argsTupleScheme getScheme() { ++ return new onewayFail_argsTupleScheme(); ++ } ++ } ++ ++ private static class onewayFail_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, onewayFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetValue()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetValue()) { ++ oprot.writeString(struct.value); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, onewayFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ public static class echoRuntimeFail_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoRuntimeFail_args"); ++ ++ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoRuntimeFail_argsStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoRuntimeFail_argsTupleSchemeFactory(); ++ ++ public java.lang.String value; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ VALUE((short)1, "value"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 1: // VALUE ++ return VALUE; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoRuntimeFail_args.class, metaDataMap); ++ } ++ ++ public echoRuntimeFail_args() { ++ } ++ ++ public echoRuntimeFail_args( ++ java.lang.String value) ++ { ++ this(); ++ this.value = value; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public echoRuntimeFail_args(echoRuntimeFail_args other) { ++ if (other.isSetValue()) { ++ this.value = other.value; ++ } ++ } ++ ++ public echoRuntimeFail_args deepCopy() { ++ return new echoRuntimeFail_args(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.value = null; ++ } ++ ++ public java.lang.String getValue() { ++ return this.value; ++ } ++ ++ public echoRuntimeFail_args setValue(java.lang.String value) { ++ this.value = value; ++ return this; ++ } ++ ++ public void unsetValue() { ++ this.value = null; ++ } ++ ++ /** Returns true if field value is set (has been assigned a value) and false otherwise */ ++ public boolean isSetValue() { ++ return this.value != null; ++ } ++ ++ public void setValueIsSet(boolean value) { ++ if (!value) { ++ this.value = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case VALUE: ++ if (value == null) { ++ unsetValue(); ++ } else { ++ setValue((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case VALUE: ++ return getValue(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case VALUE: ++ return isSetValue(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof echoRuntimeFail_args) ++ return this.equals((echoRuntimeFail_args)that); ++ return false; ++ } ++ ++ public boolean equals(echoRuntimeFail_args that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_value = true && this.isSetValue(); ++ boolean that_present_value = true && that.isSetValue(); ++ if (this_present_value || that_present_value) { ++ if (!(this_present_value && that_present_value)) ++ return false; ++ if (!this.value.equals(that.value)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); ++ if (isSetValue()) ++ hashCode = hashCode * 8191 + value.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(echoRuntimeFail_args other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetValue()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoRuntimeFail_args("); ++ boolean first = true; ++ ++ sb.append("value:"); ++ if (this.value == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.value); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class echoRuntimeFail_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoRuntimeFail_argsStandardScheme getScheme() { ++ return new echoRuntimeFail_argsStandardScheme(); ++ } ++ } ++ ++ private static class echoRuntimeFail_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, echoRuntimeFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 1: // VALUE ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, echoRuntimeFail_args struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.value != null) { ++ oprot.writeFieldBegin(VALUE_FIELD_DESC); ++ oprot.writeString(struct.value); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class echoRuntimeFail_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoRuntimeFail_argsTupleScheme getScheme() { ++ return new echoRuntimeFail_argsTupleScheme(); ++ } ++ } ++ ++ private static class echoRuntimeFail_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, echoRuntimeFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetValue()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetValue()) { ++ oprot.writeString(struct.value); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, echoRuntimeFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ public static class echoRuntimeFail_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoRuntimeFail_result"); ++ ++ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoRuntimeFail_resultStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoRuntimeFail_resultTupleSchemeFactory(); ++ ++ public java.lang.String success; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ SUCCESS((short)0, "success"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 0: // SUCCESS ++ return SUCCESS; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoRuntimeFail_result.class, metaDataMap); ++ } ++ ++ public echoRuntimeFail_result() { ++ } ++ ++ public echoRuntimeFail_result( ++ java.lang.String success) ++ { ++ this(); ++ this.success = success; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public echoRuntimeFail_result(echoRuntimeFail_result other) { ++ if (other.isSetSuccess()) { ++ this.success = other.success; ++ } ++ } ++ ++ public echoRuntimeFail_result deepCopy() { ++ return new echoRuntimeFail_result(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.success = null; ++ } ++ ++ public java.lang.String getSuccess() { ++ return this.success; ++ } ++ ++ public echoRuntimeFail_result setSuccess(java.lang.String success) { ++ this.success = success; ++ return this; ++ } ++ ++ public void unsetSuccess() { ++ this.success = null; ++ } ++ ++ /** Returns true if field success is set (has been assigned a value) and false otherwise */ ++ public boolean isSetSuccess() { ++ return this.success != null; ++ } ++ ++ public void setSuccessIsSet(boolean value) { ++ if (!value) { ++ this.success = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case SUCCESS: ++ if (value == null) { ++ unsetSuccess(); ++ } else { ++ setSuccess((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case SUCCESS: ++ return getSuccess(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case SUCCESS: ++ return isSetSuccess(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof echoRuntimeFail_result) ++ return this.equals((echoRuntimeFail_result)that); ++ return false; ++ } ++ ++ public boolean equals(echoRuntimeFail_result that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_success = true && this.isSetSuccess(); ++ boolean that_present_success = true && that.isSetSuccess(); ++ if (this_present_success || that_present_success) { ++ if (!(this_present_success && that_present_success)) ++ return false; ++ if (!this.success.equals(that.success)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); ++ if (isSetSuccess()) ++ hashCode = hashCode * 8191 + success.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(echoRuntimeFail_result other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetSuccess()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoRuntimeFail_result("); ++ boolean first = true; ++ ++ sb.append("success:"); ++ if (this.success == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.success); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class echoRuntimeFail_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoRuntimeFail_resultStandardScheme getScheme() { ++ return new echoRuntimeFail_resultStandardScheme(); ++ } ++ } ++ ++ private static class echoRuntimeFail_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, echoRuntimeFail_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 0: // SUCCESS ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.success = iprot.readString(); ++ struct.setSuccessIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, echoRuntimeFail_result struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.success != null) { ++ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); ++ oprot.writeString(struct.success); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class echoRuntimeFail_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public echoRuntimeFail_resultTupleScheme getScheme() { ++ return new echoRuntimeFail_resultTupleScheme(); ++ } ++ } ++ ++ private static class echoRuntimeFail_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, echoRuntimeFail_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetSuccess()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetSuccess()) { ++ oprot.writeString(struct.success); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, echoRuntimeFail_result struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.success = iprot.readString(); ++ struct.setSuccessIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ public static class onewayRuntimeFail_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { ++ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayRuntimeFail_args"); ++ ++ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); ++ ++ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayRuntimeFail_argsStandardSchemeFactory(); ++ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayRuntimeFail_argsTupleSchemeFactory(); ++ ++ public java.lang.String value; // required ++ ++ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ ++ public enum _Fields implements org.apache.thrift.TFieldIdEnum { ++ VALUE((short)1, "value"); ++ ++ private static final java.util.Map byName = new java.util.HashMap(); ++ ++ static { ++ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { ++ byName.put(field.getFieldName(), field); ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, or null if its not found. ++ */ ++ public static _Fields findByThriftId(int fieldId) { ++ switch(fieldId) { ++ case 1: // VALUE ++ return VALUE; ++ default: ++ return null; ++ } ++ } ++ ++ /** ++ * Find the _Fields constant that matches fieldId, throwing an exception ++ * if it is not found. ++ */ ++ public static _Fields findByThriftIdOrThrow(int fieldId) { ++ _Fields fields = findByThriftId(fieldId); ++ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); ++ return fields; ++ } ++ ++ /** ++ * Find the _Fields constant that matches name, or null if its not found. ++ */ ++ public static _Fields findByName(java.lang.String name) { ++ return byName.get(name); ++ } ++ ++ private final short _thriftId; ++ private final java.lang.String _fieldName; ++ ++ _Fields(short thriftId, java.lang.String fieldName) { ++ _thriftId = thriftId; ++ _fieldName = fieldName; ++ } ++ ++ public short getThriftFieldId() { ++ return _thriftId; ++ } ++ ++ public java.lang.String getFieldName() { ++ return _fieldName; ++ } ++ } ++ ++ // isset id assignments ++ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; ++ static { ++ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); ++ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, ++ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); ++ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); ++ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayRuntimeFail_args.class, metaDataMap); ++ } ++ ++ public onewayRuntimeFail_args() { ++ } ++ ++ public onewayRuntimeFail_args( ++ java.lang.String value) ++ { ++ this(); ++ this.value = value; ++ } ++ ++ /** ++ * Performs a deep copy on other. ++ */ ++ public onewayRuntimeFail_args(onewayRuntimeFail_args other) { ++ if (other.isSetValue()) { ++ this.value = other.value; ++ } ++ } ++ ++ public onewayRuntimeFail_args deepCopy() { ++ return new onewayRuntimeFail_args(this); ++ } ++ ++ @Override ++ public void clear() { ++ this.value = null; ++ } ++ ++ public java.lang.String getValue() { ++ return this.value; ++ } ++ ++ public onewayRuntimeFail_args setValue(java.lang.String value) { ++ this.value = value; ++ return this; ++ } ++ ++ public void unsetValue() { ++ this.value = null; ++ } ++ ++ /** Returns true if field value is set (has been assigned a value) and false otherwise */ ++ public boolean isSetValue() { ++ return this.value != null; ++ } ++ ++ public void setValueIsSet(boolean value) { ++ if (!value) { ++ this.value = null; ++ } ++ } ++ ++ public void setFieldValue(_Fields field, java.lang.Object value) { ++ switch (field) { ++ case VALUE: ++ if (value == null) { ++ unsetValue(); ++ } else { ++ setValue((java.lang.String)value); ++ } ++ break; ++ ++ } ++ } ++ ++ public java.lang.Object getFieldValue(_Fields field) { ++ switch (field) { ++ case VALUE: ++ return getValue(); ++ ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ ++ public boolean isSet(_Fields field) { ++ if (field == null) { ++ throw new java.lang.IllegalArgumentException(); ++ } ++ ++ switch (field) { ++ case VALUE: ++ return isSetValue(); ++ } ++ throw new java.lang.IllegalStateException(); ++ } ++ ++ @Override ++ public boolean equals(java.lang.Object that) { ++ if (that == null) ++ return false; ++ if (that instanceof onewayRuntimeFail_args) ++ return this.equals((onewayRuntimeFail_args)that); ++ return false; ++ } ++ ++ public boolean equals(onewayRuntimeFail_args that) { ++ if (that == null) ++ return false; ++ if (this == that) ++ return true; ++ ++ boolean this_present_value = true && this.isSetValue(); ++ boolean that_present_value = true && that.isSetValue(); ++ if (this_present_value || that_present_value) { ++ if (!(this_present_value && that_present_value)) ++ return false; ++ if (!this.value.equals(that.value)) ++ return false; ++ } ++ ++ return true; ++ } ++ ++ @Override ++ public int hashCode() { ++ int hashCode = 1; ++ ++ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); ++ if (isSetValue()) ++ hashCode = hashCode * 8191 + value.hashCode(); ++ ++ return hashCode; ++ } ++ ++ @Override ++ public int compareTo(onewayRuntimeFail_args other) { ++ if (!getClass().equals(other.getClass())) { ++ return getClass().getName().compareTo(other.getClass().getName()); ++ } ++ ++ int lastComparison = 0; ++ ++ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ if (isSetValue()) { ++ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); ++ if (lastComparison != 0) { ++ return lastComparison; ++ } ++ } ++ return 0; ++ } ++ ++ public _Fields fieldForId(int fieldId) { ++ return _Fields.findByThriftId(fieldId); ++ } ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { ++ scheme(iprot).read(iprot, this); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { ++ scheme(oprot).write(oprot, this); ++ } ++ ++ @Override ++ public java.lang.String toString() { ++ java.lang.StringBuilder sb = new java.lang.StringBuilder("onewayRuntimeFail_args("); ++ boolean first = true; ++ ++ sb.append("value:"); ++ if (this.value == null) { ++ sb.append("null"); ++ } else { ++ sb.append(this.value); ++ } ++ first = false; ++ sb.append(")"); ++ return sb.toString(); ++ } ++ ++ public void validate() throws org.apache.thrift.TException { ++ // check for required fields ++ // check for sub-struct validity ++ } ++ ++ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { ++ try { ++ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { ++ try { ++ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); ++ } catch (org.apache.thrift.TException te) { ++ throw new java.io.IOException(te); ++ } ++ } ++ ++ private static class onewayRuntimeFail_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public onewayRuntimeFail_argsStandardScheme getScheme() { ++ return new onewayRuntimeFail_argsStandardScheme(); ++ } ++ } ++ ++ private static class onewayRuntimeFail_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { ++ ++ public void read(org.apache.thrift.protocol.TProtocol iprot, onewayRuntimeFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TField schemeField; ++ iprot.readStructBegin(); ++ while (true) ++ { ++ schemeField = iprot.readFieldBegin(); ++ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { ++ break; ++ } ++ switch (schemeField.id) { ++ case 1: // VALUE ++ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } else { ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ break; ++ default: ++ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); ++ } ++ iprot.readFieldEnd(); ++ } ++ iprot.readStructEnd(); ++ ++ // check for required fields of primitive type, which can't be checked in the validate method ++ struct.validate(); ++ } ++ ++ public void write(org.apache.thrift.protocol.TProtocol oprot, onewayRuntimeFail_args struct) throws org.apache.thrift.TException { ++ struct.validate(); ++ ++ oprot.writeStructBegin(STRUCT_DESC); ++ if (struct.value != null) { ++ oprot.writeFieldBegin(VALUE_FIELD_DESC); ++ oprot.writeString(struct.value); ++ oprot.writeFieldEnd(); ++ } ++ oprot.writeFieldStop(); ++ oprot.writeStructEnd(); ++ } ++ ++ } ++ ++ private static class onewayRuntimeFail_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { ++ public onewayRuntimeFail_argsTupleScheme getScheme() { ++ return new onewayRuntimeFail_argsTupleScheme(); ++ } ++ } ++ ++ private static class onewayRuntimeFail_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { ++ ++ @Override ++ public void write(org.apache.thrift.protocol.TProtocol prot, onewayRuntimeFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet optionals = new java.util.BitSet(); ++ if (struct.isSetValue()) { ++ optionals.set(0); ++ } ++ oprot.writeBitSet(optionals, 1); ++ if (struct.isSetValue()) { ++ oprot.writeString(struct.value); ++ } ++ } ++ ++ @Override ++ public void read(org.apache.thrift.protocol.TProtocol prot, onewayRuntimeFail_args struct) throws org.apache.thrift.TException { ++ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; ++ java.util.BitSet incoming = iprot.readBitSet(1); ++ if (incoming.get(0)) { ++ struct.value = iprot.readString(); ++ struct.setValueIsSet(true); ++ } ++ } ++ } ++ ++ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { ++ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); ++ } ++ } ++ ++ private static void unusedMethod() {} ++} +diff --git a/test/src/main/scripts/generate-thrift.sh b/test/src/main/scripts/generate-thrift.sh +new file mode 100755 +index 0000000..061ad4f +--- /dev/null ++++ b/test/src/main/scripts/generate-thrift.sh +@@ -0,0 +1,24 @@ ++#! /usr/bin/env bash ++ ++# 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. ++ ++# This script will regenerate the thrift code for accumulo-trace. ++INCLUDED_MODULES=(-) ++BASE_OUTPUT_PACKAGE='org.apache.accumulo' ++PACKAGES_TO_GENERATE=(test.rpc) ++ ++. ../core/src/main/scripts/generate-thrift.sh ++ +diff --git a/test/src/main/thrift/test.thrift b/test/src/main/thrift/test.thrift +new file mode 100644 +index 0000000..7e4d955 +--- /dev/null ++++ b/test/src/main/thrift/test.thrift +@@ -0,0 +1,30 @@ ++/* ++* 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. ++*/ ++ ++namespace java org.apache.accumulo.test.rpc.thrift ++ ++service SimpleThriftService ++{ ++ string echoPass(1:string value) ++ oneway void onewayPass(1:string value) ++ ++ string echoFail(1:string value) ++ oneway void onewayFail(1:string value) ++ ++ string echoRuntimeFail(1:string value) ++ oneway void onewayRuntimeFail(1:string value) ++} +-- +2.9.3 + diff --git a/accumulo.spec b/accumulo.spec index d09ff38..59efaca 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -6,7 +6,7 @@ Name: accumulo Version: 1.8.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 Group: Development/Libraries @@ -23,6 +23,9 @@ Source5: %{name}-monitor.service # Java configuration file for Fedora Source6: %{name}.conf +# Backport upstream update to thrift 0.10.0 before any Fedora patches +Patch0: ACCUMULO-4551-and-4584-backport.patch + # Apply Fedora JNI conventions Patch3: native-code.patch # Patch upstream-provided example configuration for Fedora @@ -31,8 +34,6 @@ Patch5: default-conf.patch Patch8: flot8.patch # Workaround for https://github.com/jline/jline2/issues/205 Patch9: jline-shell-workaround.patch -# Fix version number in thrift script -Patch10: thrift-0.10.0.patch # Fix differences with guava version Patch11: guava.patch @@ -44,11 +45,7 @@ BuildRequires: apache-commons-io BuildRequires: apache-commons-lang BuildRequires: apache-commons-logging BuildRequires: apache-commons-math -%if 0%{?fedora} > 24 BuildRequires: apache-commons-vfs >= 2.1-7 -%else -BuildRequires: apache-commons-vfs < 2.1 -%endif BuildRequires: auto-service BuildRequires: beust-jcommander BuildRequires: bouncycastle @@ -64,7 +61,7 @@ BuildRequires: jetty-servlet BuildRequires: jetty-util BuildRequires: jline2 BuildRequires: jpackage-utils -BuildRequires: libthrift-java +BuildRequires: libthrift-java >= 0.10.0 BuildRequires: log4j12 BuildRequires: maven-local BuildRequires: mvn(javax.servlet:javax.servlet-api) @@ -74,10 +71,11 @@ BuildRequires: powermock-core BuildRequires: powermock-junit4 BuildRequires: slf4j BuildRequires: systemd-units -BuildRequires: thrift +BuildRequires: thrift >= 0.10.0 BuildRequires: zookeeper-java Requires: %{name}-core = %{version}-%{release} +Requires: %{name}-shell = %{version}-%{release} Requires: %{name}-master = %{version}-%{release} Requires: %{name}-tserver = %{version}-%{release} Requires: %{name}-gc = %{version}-%{release} @@ -100,6 +98,7 @@ License: ASL 2.0 and BSD Group: Applications/System BuildArch: noarch Requires(pre): /usr/sbin/useradd +Requires: libthrift-java >= 0.10.0 Obsoletes: %{name}-javadoc < 1.6.0-5%{?dist} %description core @@ -274,10 +273,23 @@ features a few novel improvements on the BigTable design in the form of cell-level access labels and a server-side programming mechanism that can modify key/value pairs at various points in the data management process. -This package provides the shell service for %{longproj}. +This package provides the shell client for %{longproj}. %prep %autosetup -p1 + +# Remove tests which use MiniDFSCluster, because Hadoop is still using old +# Jetty versions, and the class path is hard to get correct for these +rm -rf start/src/test/java/org/apache/accumulo/start/classloader/vfs/ +rm -f core/src/test/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShimTest.java + +# Remove test(s) which rely on questionable log or console capturing behavior +rm -f core/src/test/java/org/apache/accumulo/core/iterators/user/{,BigDecimal}CombinerTest.java +rm -f shell/src/test/java/org/apache/accumulo/shell/Shell{,Config}Test.java + +# Make sure thrift script from thrift 0.10.0 patch is executable +chmod +x test/src/main/scripts/generate-thrift.sh + # Remove flot and jquery bundling from upstream tarball rm -rf server/monitor/src/main/resources/web/flot/ @@ -330,13 +342,11 @@ rm -rf server/monitor/src/main/resources/web/flot/ %mvn_package ":%{name}-native" __noinstall %build -# TODO Unit tests are skipped, because upstream tries to do some integration -# testing in the unit tests, and they expect certain resources and dependencies -# that are not typically available, or are too complicated to configure, -# especially in the start jar. These should be enabled when possible. -# ITs are skipped, because they time out frequently and take too many resources -# to run reliably. Failures do not reliably indicate meaningful issues. -%mvn_build -j -- -Pthrift -DforkCount=1C -DskipTests -DskipITs +# - Skipping javadocs, because it's not useful or required +# - ITs are skipped because they time out frequently and take too many +# resources to run reliably. Failures do not reliably indicate meaningful +# issues. +%mvn_build -j -- -Pthrift -DforkCount=1C -DskipITs %install %mvn_install @@ -530,6 +540,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Mon Mar 27 2017 Christopher Tubbs - 1.8.1-2 +- Clean up old patches and improve thrift 0.10.0 patch + * Wed Mar 15 2017 Mike Miller - 1.8.1-1 - Update to 1.8.1 diff --git a/commons-configuration.patch b/commons-configuration.patch deleted file mode 100644 index 84707fc..0000000 --- a/commons-configuration.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -index e512936..b78e958 100644 ---- a/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -+++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java -@@ -713,7 +713,8 @@ public class MiniAccumuloClusterImpl implements AccumuloCluster { - - @Override - public ClientConfiguration getClientConfig() { -- return new ClientConfiguration(Arrays.asList(new MapConfiguration(config.getSiteConfig()))).withInstance(this.getInstanceName()).withZkHosts( -+ MapConfiguration array = new MapConfiguration((Map)(Map)config.getSiteConfig()); -+ return new ClientConfiguration(Arrays.asList(array)).withInstance(this.getInstanceName()).withZkHosts( - this.getZooKeepers()); - } - -diff --git a/pom.xml b/pom.xml -index 3d0d903..8c3d880 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -179,7 +179,7 @@ - - commons-configuration - commons-configuration -- 1.6 -+ 1.9 - - - commons-httpclient diff --git a/commons-math.patch b/commons-math.patch deleted file mode 100644 index a743931..0000000 --- a/commons-math.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/core/src/main/java/org/apache/accumulo/core/util/Stat.java b/core/src/main/java/org/apache/accumulo/core/util/Stat.java -index d2d560e..2fdfd62 100644 ---- a/core/src/main/java/org/apache/accumulo/core/util/Stat.java -+++ b/core/src/main/java/org/apache/accumulo/core/util/Stat.java -@@ -16,12 +16,12 @@ - */ - package org.apache.accumulo.core.util; - --import org.apache.commons.math.stat.descriptive.StorelessUnivariateStatistic; --import org.apache.commons.math.stat.descriptive.moment.Mean; --import org.apache.commons.math.stat.descriptive.moment.StandardDeviation; --import org.apache.commons.math.stat.descriptive.rank.Max; --import org.apache.commons.math.stat.descriptive.rank.Min; --import org.apache.commons.math.stat.descriptive.summary.Sum; -+import org.apache.commons.math3.stat.descriptive.StorelessUnivariateStatistic; -+import org.apache.commons.math3.stat.descriptive.moment.Mean; -+import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; -+import org.apache.commons.math3.stat.descriptive.rank.Max; -+import org.apache.commons.math3.stat.descriptive.rank.Min; -+import org.apache.commons.math3.stat.descriptive.summary.Sum; - - public class Stat { - Min min; -diff --git a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java -index d2d560e..2fdfd62 100644 ---- a/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java -+++ b/core/src/main/java/org/apache/accumulo/core/file/rfile/RFile.java -@@ -64,7 +64,7 @@ - import org.apache.accumulo.core.iterators.system.LocalityGroupIterator.LocalityGroup; - import org.apache.accumulo.core.util.MutableByteSequence; - import org.apache.commons.lang.mutable.MutableLong; --import org.apache.commons.math.stat.descriptive.SummaryStatistics; -+import org.apache.commons.math3.stat.descriptive.SummaryStatistics; - import org.apache.hadoop.io.Writable; - import org.apache.log4j.Logger; - diff --git a/jetty9.patch b/jetty9.patch deleted file mode 100644 index 1ecb1c7..0000000 --- a/jetty9.patch +++ /dev/null @@ -1,194 +0,0 @@ -diff --git a/assemble/pom.xml b/assemble/pom.xml -index db26388..49d127f 100644 ---- a/assemble/pom.xml -+++ b/assemble/pom.xml -@@ -126,10 +126,6 @@ - - - org.eclipse.jetty -- jetty-continuation -- -- -- org.eclipse.jetty - jetty-http - - -diff --git a/assemble/src/main/assemblies/component.xml b/assemble/src/main/assemblies/component.xml -index 96e1fbe..a0fd410 100644 ---- a/assemble/src/main/assemblies/component.xml -+++ b/assemble/src/main/assemblies/component.xml -@@ -35,7 +35,6 @@ - org.apache.commons:commons-math - org.apache.commons:commons-vfs2 - org.apache.thrift:libthrift -- org.eclipse.jetty:jetty-continuation - org.eclipse.jetty:jetty-http - org.eclipse.jetty:jetty-io - org.eclipse.jetty:jetty-security -diff --git a/pom.xml b/pom.xml -index bd206e3..3d0d903 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -131,7 +131,7 @@ - 2.2.0 - 3.1 - false -- 8.1.15.v20140411 -+ 9.1.5.v20140505 - 1.6 - 1.6 - 3.0.5 -@@ -204,7 +204,7 @@ - - javax.servlet - javax.servlet-api -- 3.0.1 -+ 3.1.0 - - - javax.ws.rs -@@ -421,11 +421,6 @@ - - - org.eclipse.jetty -- jetty-continuation -- ${jetty.version} -- -- -- org.eclipse.jetty - jetty-http - ${jetty.version} - -@@ -454,12 +449,6 @@ - jetty-util - ${jetty.version} - -- -- -- org.mortbay.jetty -- jetty -- 6.1.26 -- - - org.powermock - powermock-api-easymock -diff --git a/server/monitor/pom.xml b/server/monitor/pom.xml -index f3dcd4a..e8146be 100644 ---- a/server/monitor/pom.xml -+++ b/server/monitor/pom.xml -@@ -81,10 +81,6 @@ - - - org.eclipse.jetty -- jetty-http -- -- -- org.eclipse.jetty - jetty-security - - -@@ -101,7 +97,7 @@ - - - org.eclipse.jetty -- jetty-continuation -+ jetty-http - runtime - - -diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java -index 41890e8..dea263a 100644 ---- a/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java -+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java -@@ -23,10 +23,10 @@ import org.apache.accumulo.core.conf.Property; - import org.apache.commons.lang.StringUtils; - import org.eclipse.jetty.security.ConstraintMapping; - import org.eclipse.jetty.security.ConstraintSecurityHandler; -+import org.eclipse.jetty.server.HttpConnectionFactory; - import org.eclipse.jetty.server.Server; --import org.eclipse.jetty.server.nio.SelectChannelConnector; -+import org.eclipse.jetty.server.ServerConnector; - import org.eclipse.jetty.server.session.SessionHandler; --import org.eclipse.jetty.server.ssl.SslSelectChannelConnector; - import org.eclipse.jetty.servlet.ServletContextHandler; - import org.eclipse.jetty.util.security.Constraint; - import org.eclipse.jetty.util.ssl.SslContextFactory; -@@ -35,7 +35,7 @@ public class EmbeddedWebServer { - private static String EMPTY = ""; - - Server server = null; -- SelectChannelConnector connector = null; -+ ServerConnector connector = null; - ServletContextHandler handler; - boolean usingSsl; - -@@ -48,13 +48,13 @@ public class EmbeddedWebServer { - final AccumuloConfiguration conf = Monitor.getSystemConfiguration(); - if (EMPTY.equals(conf.get(Property.MONITOR_SSL_KEYSTORE)) || EMPTY.equals(conf.get(Property.MONITOR_SSL_KEYSTOREPASS)) - || EMPTY.equals(conf.get(Property.MONITOR_SSL_TRUSTSTORE)) || EMPTY.equals(conf.get(Property.MONITOR_SSL_TRUSTSTOREPASS))) { -- connector = new SelectChannelConnector(); -+ connector = new ServerConnector(server, new HttpConnectionFactory()); - usingSsl = false; - } else { - SslContextFactory sslContextFactory = new SslContextFactory(); - sslContextFactory.setKeyStorePath(conf.get(Property.MONITOR_SSL_KEYSTORE)); - sslContextFactory.setKeyStorePassword(conf.get(Property.MONITOR_SSL_KEYSTOREPASS)); -- sslContextFactory.setTrustStore(conf.get(Property.MONITOR_SSL_TRUSTSTORE)); -+ sslContextFactory.setTrustStorePath(conf.get(Property.MONITOR_SSL_TRUSTSTORE)); - sslContextFactory.setTrustStorePassword(conf.get(Property.MONITOR_SSL_TRUSTSTOREPASS)); - - final String includedCiphers = conf.get(Property.MONITOR_SSL_INCLUDE_CIPHERS); -@@ -72,7 +72,7 @@ public class EmbeddedWebServer { - sslContextFactory.setIncludeProtocols(StringUtils.split(includeProtocols, ',')); - } - -- connector = new SslSelectChannelConnector(sslContextFactory); -+ connector = new ServerConnector(server, sslContextFactory); - usingSsl = true; - } - -diff --git a/start/pom.xml b/start/pom.xml -index 9f74aff..bd36449 100644 ---- a/start/pom.xml -+++ b/start/pom.xml -@@ -109,24 +109,4 @@ - - - -- -- -- -- hadoop-1 -- -- -- hadoop.profile -- 1 -- -- -- -- -- org.mortbay.jetty -- jetty -- test -- -- -- -- - -diff --git a/test/pom.xml b/test/pom.xml -index 8d8b838..13998c3 100644 ---- a/test/pom.xml -+++ b/test/pom.xml -@@ -307,11 +307,6 @@ - hadoop-tools - test - -- -- org.mortbay.jetty -- jetty -- test -- - - - @@ -151,20 +151,21 @@ index 3530a3e..6d90eda 100644 3.4.6 diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java -index a3d185d..3cc16a4 100644 +index 89c755d..5ab5263 100644 --- a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java +++ b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java -@@ -201,7 +201,7 @@ public class Proxy implements KeywordExecutable { +@@ -212,8 +212,7 @@ public class Proxy implements KeywordExecutable { ProxyServer impl = new ProxyServer(properties); // Wrap the implementation -- translate some exceptions -- AccumuloProxy.Iface wrappedImpl = RpcWrapper.service(impl, new AccumuloProxy.Processor(impl)); +- AccumuloProxy.Iface wrappedImpl = RpcWrapper.service(impl, +- new AccumuloProxy.Processor(impl)); + AccumuloProxy.Iface wrappedImpl = RpcWrapper.service(impl); // Create the processor from the implementation TProcessor processor = new AccumuloProxy.Processor<>(wrappedImpl); diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java -index b942913..6fdbb04 100644 +index b9df911..3e9d8d5 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java +++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java @@ -19,19 +19,11 @@ package org.apache.accumulo.server.rpc; @@ -186,8 +187,8 @@ index b942913..6fdbb04 100644 -import org.slf4j.LoggerFactory; /** - * This class accommodates the changes in THRIFT-1805, which appeared in Thrift 0.9.1 and restricts client-side notification of server-side errors to -@@ -49,23 +41,17 @@ import org.slf4j.LoggerFactory; + * This class accommodates the changes in THRIFT-1805, which appeared in Thrift 0.9.1 and restricts +@@ -56,14 +48,9 @@ import org.slf4j.LoggerFactory; * @since 1.6.1 */ public class RpcWrapper { @@ -203,18 +204,20 @@ index b942913..6fdbb04 100644 + InvocationHandler handler = getInvocationHandler(instance); @SuppressWarnings("unchecked") - I proxiedInstance = (I) Proxy.newProxyInstance(instance.getClass().getClassLoader(), instance.getClass().getInterfaces(), handler); + I proxiedInstance = (I) Proxy.newProxyInstance(instance.getClass().getClassLoader(), +@@ -71,10 +58,8 @@ public class RpcWrapper { return proxiedInstance; } -- protected static RpcServerInvocationHandler getInvocationHandler(final T instance, final Set onewayMethods) { +- protected static RpcServerInvocationHandler getInvocationHandler(final T instance, +- final Set onewayMethods) { + protected static RpcServerInvocationHandler getInvocationHandler(final T instance) { return new RpcServerInvocationHandler(instance) { - private final Logger log = LoggerFactory.getLogger(instance.getClass()); @Override public Object invoke(Object obj, Method method, Object[] args) throws Throwable { -@@ -73,56 +59,10 @@ public class RpcWrapper { +@@ -82,57 +67,10 @@ public class RpcWrapper { try { return super.invoke(obj, method, args); } catch (RuntimeException e) { @@ -248,7 +251,8 @@ index b942913..6fdbb04 100644 - } catch (SecurityException e) { - throw new RuntimeException("Could not access isOneway method", e); - } -- // In java7, this appears to be copying the method, but it's trivial for us to return the object to how it was before. +- // In java7, this appears to be copying the method, but it's trivial for us to return the object +- // to how it was before. - final boolean accessible = isOnewayMethod.isAccessible(); - isOnewayMethod.setAccessible(true); - @@ -275,10 +279,10 @@ index b942913..6fdbb04 100644 } diff --git a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java b/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java deleted file mode 100644 -index d32178e..0000000 +index a942325..0000000 --- a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java +++ /dev/null -@@ -1,300 +0,0 @@ +@@ -1,307 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with @@ -374,8 +378,10 @@ index d32178e..0000000 - - final FakeService impl = new FakeServiceImpl(); - -- // "short" names throw RTEs and are oneway, while long names do not throw exceptions and are not oneway. -- RpcServerInvocationHandler handler = RpcWrapper.getInvocationHandler(impl, Sets.newHashSet("foo", "bar")); +- // "short" names throw RTEs and are oneway, while long names do not throw exceptions and are not +- // oneway. +- RpcServerInvocationHandler handler = RpcWrapper.getInvocationHandler(impl, +- Sets.newHashSet("foo", "bar")); - - // Should throw an exception, but not be wrapped because the method is oneway - try { @@ -395,8 +401,10 @@ index d32178e..0000000 - - final FakeService impl = new FakeServiceImpl(); - -- // "short" names throw RTEs and are not oneway, while long names do not throw exceptions and are oneway. -- RpcServerInvocationHandler handler = RpcWrapper.getInvocationHandler(impl, Sets.newHashSet("foobar", "barfoo")); +- // "short" names throw RTEs and are not oneway, while long names do not throw exceptions and are +- // oneway. +- RpcServerInvocationHandler handler = RpcWrapper.getInvocationHandler(impl, +- Sets.newHashSet("foobar", "barfoo")); - - // Should throw an exception, but not be wrapped because the method is oneway - try { @@ -454,7 +462,8 @@ index d32178e..0000000 - } - - /** -- * An implementation of the fake thrift service. The "short" names throw RTEs, while long names do not. +- * An implementation of the fake thrift service. The "short" names throw RTEs, while long names do +- * not. - */ - public static class FakeServiceImpl implements FakeService { - @Override @@ -479,9 +488,11 @@ index d32178e..0000000 - } - - /** -- * A fake ProcessFunction implementation for testing that allows injection of method name and oneway. +- * A fake ProcessFunction implementation for testing that allows injection of method name and +- * oneway. - */ -- private static class fake_proc extends org.apache.thrift.ProcessFunction { +- private static class fake_proc +- extends org.apache.thrift.ProcessFunction { - final private boolean isOneway; - - public fake_proc(String methodName, boolean isOneway) { @@ -580,23 +591,23 @@ index d32178e..0000000 - } -} diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java -index 37d127a..b6d97ce 100644 +index ab6fa88..18d9377 100644 --- a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java +++ b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java -@@ -343,7 +343,7 @@ public class TServerUtilsTest { +@@ -354,7 +354,7 @@ public class TServerUtilsTest { private ServerAddress startServer() throws Exception { AccumuloServerContext ctx = new AccumuloServerContext(factory); ClientServiceHandler clientHandler = new ClientServiceHandler(ctx, null, null); - Iface rpcProxy = RpcWrapper.service(clientHandler, new Processor(clientHandler)); + Iface rpcProxy = RpcWrapper.service(clientHandler); Processor processor = new Processor<>(rpcProxy); - // "localhost" explicitly to make sure we can always bind to that interface (avoids DNS misconfiguration) - String hostname = "localhost"; + // "localhost" explicitly to make sure we can always bind to that interface (avoids DNS + // misconfiguration) diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java -index 76292c8..c8cbbbc 100644 +index 0aeaaea..62f63f0 100644 --- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java +++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java -@@ -715,7 +715,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa +@@ -751,7 +751,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa } private HostAndPort startStatsService() throws UnknownHostException { @@ -606,10 +617,10 @@ index 76292c8..c8cbbbc 100644 if (ThriftServerType.SASL == getThriftServerType()) { Iface tcProxy = TCredentialsUpdatingWrapper.service(rpcProxy, getClass(), getConfiguration()); diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java -index 8009d66..010a568 100644 +index 9414b98..bac30b1 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/Master.java +++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java -@@ -1236,7 +1236,7 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List +@@ -1318,7 +1318,7 @@ public class Master extends AccumuloServerContext } clientHandler = new MasterClientServiceHandler(this); @@ -617,50 +628,22 @@ index 8009d66..010a568 100644 + Iface rpcProxy = RpcWrapper.service(clientHandler); final Processor processor; if (ThriftServerType.SASL == getThriftServerType()) { - Iface tcredsProxy = TCredentialsUpdatingWrapper.service(rpcProxy, clientHandler.getClass(), getConfiguration()); -@@ -1270,8 +1270,8 @@ public class Master extends AccumuloServerContext implements LiveTServerSet.List - - // Start the replication coordinator which assigns tservers to service replication requests - MasterReplicationCoordinator impl = new MasterReplicationCoordinator(this); -- ReplicationCoordinator.Processor replicationCoordinatorProcessor = new ReplicationCoordinator.Processor<>(RpcWrapper.service( -- impl, new ReplicationCoordinator.Processor(impl))); -+ ReplicationCoordinator.Processor replicationCoordinatorProcessor = new ReplicationCoordinator.Processor<>( -+ RpcWrapper.service((ReplicationCoordinator.Iface) impl)); - ServerAddress replAddress = TServerUtils.startServer(this, hostname, Property.MASTER_REPLICATION_COORDINATOR_PORT, replicationCoordinatorProcessor, - "Master Replication Coordinator", "Replication Coordinator", null, Property.MASTER_REPLICATION_COORDINATOR_MINTHREADS, - Property.MASTER_REPLICATION_COORDINATOR_THREADCHECK, Property.GENERAL_MAX_MESSAGE_SIZE); + Iface tcredsProxy = TCredentialsUpdatingWrapper.service(rpcProxy, clientHandler.getClass(), +@@ -1358,8 +1358,7 @@ public class Master extends AccumuloServerContext + ReplicationCoordinator.Processor replicationCoordinatorProcessor = + new ReplicationCoordinator.Processor<>( + // @formatter:on +- RpcWrapper.service(impl, +- new ReplicationCoordinator.Processor(impl))); ++ RpcWrapper.service((ReplicationCoordinator.Iface) impl)); + ServerAddress replAddress = TServerUtils.startServer(this, hostname, + Property.MASTER_REPLICATION_COORDINATOR_PORT, replicationCoordinatorProcessor, + "Master Replication Coordinator", "Replication Coordinator", null, diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java -index a937235..63976e0 100644 +index f87841d..6b5062c 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java -@@ -18,6 +18,8 @@ package org.apache.accumulo.tserver; - - import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; - import static java.nio.charset.StandardCharsets.UTF_8; -+import static java.util.concurrent.TimeUnit.MILLISECONDS; -+import static java.util.concurrent.TimeUnit.NANOSECONDS; - import static org.apache.accumulo.server.problems.ProblemType.TABLET_LOAD; - - import java.io.IOException; -@@ -126,6 +128,7 @@ import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException; - import org.apache.accumulo.core.tabletserver.thrift.TDurability; - import org.apache.accumulo.core.tabletserver.thrift.TSampleNotPresentException; - import org.apache.accumulo.core.tabletserver.thrift.TSamplerConfiguration; -+import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal; - import org.apache.accumulo.core.tabletserver.thrift.TabletClientService; - import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface; - import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Processor; -@@ -259,9 +262,6 @@ import org.slf4j.Logger; - import org.slf4j.LoggerFactory; - - import com.google.common.net.HostAndPort; --import static java.util.concurrent.TimeUnit.MILLISECONDS; --import static java.util.concurrent.TimeUnit.NANOSECONDS; --import org.apache.accumulo.core.tabletserver.thrift.TUnloadTabletGoal; - - public class TabletServer extends AccumuloServerContext implements Runnable { - -@@ -2306,7 +2306,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable { +@@ -2508,7 +2508,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable { private HostAndPort startTabletClientService() throws UnknownHostException { // start listening for client connection last clientHandler = new ThriftClientHandler(); @@ -668,24 +651,26 @@ index a937235..63976e0 100644 + Iface rpcProxy = RpcWrapper.service(clientHandler); final Processor processor; if (ThriftServerType.SASL == getThriftServerType()) { - Iface tcredProxy = TCredentialsUpdatingWrapper.service(rpcProxy, ThriftClientHandler.class, getConfiguration()); -@@ -2322,7 +2322,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable { + Iface tcredProxy = TCredentialsUpdatingWrapper.service(rpcProxy, ThriftClientHandler.class, +@@ -2525,8 +2525,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable { private HostAndPort startReplicationService() throws UnknownHostException { final ReplicationServicerHandler handler = new ReplicationServicerHandler(this); -- ReplicationServicer.Iface rpcProxy = RpcWrapper.service(handler, new ReplicationServicer.Processor(handler)); +- ReplicationServicer.Iface rpcProxy = RpcWrapper.service(handler, +- new ReplicationServicer.Processor(handler)); + ReplicationServicer.Iface rpcProxy = RpcWrapper.service(handler); - ReplicationServicer.Iface repl = TCredentialsUpdatingWrapper.service(rpcProxy, handler.getClass(), getConfiguration()); - ReplicationServicer.Processor processor = new ReplicationServicer.Processor<>(repl); - AccumuloConfiguration conf = getServerConfigurationFactory().getConfiguration(); + ReplicationServicer.Iface repl = TCredentialsUpdatingWrapper.service(rpcProxy, + handler.getClass(), getConfiguration()); + // @formatter:off diff --git a/test/pom.xml b/test/pom.xml -index de2d340..3a653dc 100644 +index f6a9d00..7ef55c4 100644 --- a/test/pom.xml +++ b/test/pom.xml -@@ -286,6 +286,29 @@ +@@ -277,6 +277,29 @@ + - ++ + thrift + + @@ -708,27 +693,26 @@ index de2d340..3a653dc 100644 + + + -+ + mrit - diff --git a/test/src/main/findbugs/exclude-filter.xml b/test/src/main/findbugs/exclude-filter.xml index 3c3e596..9339c36 100644 --- a/test/src/main/findbugs/exclude-filter.xml +++ b/test/src/main/findbugs/exclude-filter.xml -@@ -16,6 +16,12 @@ +@@ -15,6 +15,12 @@ + limitations under the License. --> - ++ + + + + + -+ + - diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/Mocket.java b/test/src/main/java/org/apache/accumulo/test/rpc/Mocket.java new file mode 100644 index 0000000..81c774d @@ -5453,6 +5437,3 @@ index 0000000..7e4d955 + string echoRuntimeFail(1:string value) + oneway void onewayRuntimeFail(1:string value) +} --- -2.9.3 - diff --git a/accumulo.spec b/accumulo.spec index 355aa93..20a03c2 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -5,8 +5,8 @@ %global main_class org.apache.%{name}.start.Main Name: accumulo -Version: 1.8.1 -Release: 10%{?dist} +Version: 1.9.1 +Release: 1%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 Group: Development/Libraries @@ -36,6 +36,8 @@ Patch8: flot8.patch Patch9: jline-shell-workaround.patch # Fix differences with guava version Patch11: guava.patch +# Fix jetty 9.4 (removed SessionManager) +Patch12: fix-jetty-9.4.patch BuildRequires: apache-commons-cli BuildRequires: apache-commons-codec @@ -314,10 +316,16 @@ rm -rf server/monitor/src/main/resources/web/flot/ %pom_remove_plugin :sortpom-maven-plugin %pom_remove_plugin :mavanagaiata %pom_remove_plugin :findbugs-maven-plugin -%pom_remove_plugin :maven-java-formatter-plugin +%pom_remove_plugin :formatter-maven-plugin +%pom_remove_plugin :impsort-maven-plugin +%pom_remove_plugin :warbucks-maven-plugin %pom_remove_plugin :modernizer-maven-plugin %pom_remove_plugin :apilyzer-maven-plugin core +# Disable exec plugin for start module, which builds test jars; tests require +# miniDFS, which isn't available in Fedora at this time +%pom_remove_plugin :exec-maven-plugin start + # Mini isn't needed #%%mvn_package ":%%{name}-minicluster" __noinstall %mvn_package ":%{name}-{project,core,fate,trace,start}" core @@ -340,6 +348,7 @@ rm -rf server/monitor/src/main/resources/web/flot/ # issues. # - Tests are skipped because of spurious failures of surefire plugin in the # koji builders +rm -rf start/src/test/ # start tests require miniDFS for compilation; not available in Fedora %mvn_build -j -- -Pthrift -DskipTests -DskipITs %install @@ -534,6 +543,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Fri Jul 06 2018 Christopher Tubbs - 1.9.1-1 +- Update to 1.9.1 + * Wed Feb 07 2018 Fedora Release Engineering - 1.8.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/default-conf.patch b/default-conf.patch index 0c3c4c1..157a82a 100644 --- a/default-conf.patch +++ b/default-conf.patch @@ -1,5 +1,5 @@ diff --git a/assemble/conf/templates/accumulo-metrics.xml b/assemble/conf/templates/accumulo-metrics.xml -index ec54994..04edb84 100644 +index 3b97809..22ac7e9 100644 --- a/assemble/conf/templates/accumulo-metrics.xml +++ b/assemble/conf/templates/accumulo-metrics.xml @@ -23,7 +23,8 @@ @@ -13,7 +13,7 @@ index ec54994..04edb84 100644 +- +- $HADOOP_PREFIX/share/hadoop/client/[^.].*.jar, +- - + /etc/accumulo/lib,/etc/hadoop Classpaths that accumulo checks for updates and class files. diff --git a/fix-jetty-9.4.patch b/fix-jetty-9.4.patch new file mode 100644 index 0000000..d891845 --- /dev/null +++ b/fix-jetty-9.4.patch @@ -0,0 +1,12 @@ +diff -ur accumulo-1.9.1/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java accumulo-1.9.1-mod/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java +--- accumulo-1.9.1/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java 2018-05-09 21:27:43.000000000 -0400 ++++ accumulo-1.9.1-mod/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java 2018-07-06 15:18:03.410228168 -0400 +@@ -85,7 +85,7 @@ + + handler = new ServletContextHandler(server, "/", new SessionHandler(), + new ConstraintSecurityHandler(), null, null); +- handler.getSessionHandler().getSessionManager().getSessionCookieConfig().setHttpOnly(true); ++ handler.getSessionHandler().setHttpOnly(true); + + disableTrace("/"); + } diff --git a/flot8.patch b/flot8.patch index b78f15e..6a96191 100644 --- a/flot8.patch +++ b/flot8.patch @@ -1,12 +1,13 @@ diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java -index 75d5436..9660340 100644 +index af90b6e..561cd28 100644 --- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java +++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java -@@ -156,6 +156,7 @@ abstract public class BasicServlet extends HttpServlet { - sb.append("\n"); - sb.append("\n"); - sb.append("\n"); -+ sb.append("\n"); +@@ -152,6 +152,8 @@ abstract public class BasicServlet extends HttpServlet { + + " src=\"/web/flot/jquery.js\">\n"); + sb.append("\n"); ++ sb.append("\n"); sb.append("\n"); diff --git a/guava.patch b/guava.patch index df26956..852fe81 100644 --- a/guava.patch +++ b/guava.patch @@ -12,12 +12,12 @@ index d243dfe..35a18e2 100644 } diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java -index 0c09396..c95f375 100644 +index 90f5fa0..05d2ccf 100644 --- a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java +++ b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java -@@ -84,7 +84,7 @@ public class CloseWriteAheadLogReferences implements Runnable { - public void run() { - // As long as we depend on a newer Guava than Hadoop uses, we have to make sure we're compatible with +@@ -86,7 +86,7 @@ public class CloseWriteAheadLogReferences implements Runnable { + // As long as we depend on a newer Guava than Hadoop uses, we have to make sure we're compatible + // with // what the version they bundle uses. - Stopwatch sw = new Stopwatch(); + Stopwatch sw = Stopwatch.createUnstarted(); @@ -25,10 +25,10 @@ index 0c09396..c95f375 100644 Connector conn; try { diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java b/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java -index e286371..ef082b9 100644 +index aa6cc4d..71651b7 100644 --- a/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java +++ b/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java -@@ -83,7 +83,7 @@ public class RemoveCompleteReplicationRecords implements Runnable { +@@ -85,7 +85,7 @@ public class RemoveCompleteReplicationRecords implements Runnable { WorkSection.limit(bs); bs.addScanIterator(cfg); @@ -38,7 +38,7 @@ index e286371..ef082b9 100644 try { sw.start(); diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java -index 340a58e..b0ef0a7 100644 +index c2711ed..5725d9c 100644 --- a/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java +++ b/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java @@ -75,7 +75,7 @@ public class ScannerIT extends AccumuloClusterHarness { diff --git a/jline-shell-workaround.patch b/jline-shell-workaround.patch index b9e3241..4bb942a 100644 --- a/jline-shell-workaround.patch +++ b/jline-shell-workaround.patch @@ -1,8 +1,8 @@ diff --git a/shell/src/main/java/org/apache/accumulo/shell/Shell.java b/shell/src/main/java/org/apache/accumulo/shell/Shell.java -index 9231c78..0336a67 100644 +index 31cd5d4..fdc2f50 100644 --- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java +++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java -@@ -228,6 +228,7 @@ public class Shell extends ShellOptions implements KeywordExecutable { +@@ -229,6 +229,7 @@ public class Shell extends ShellOptions implements KeywordExecutable { private long lastUserActivity = System.nanoTime(); private boolean logErrorsToConsole = false; private boolean masking = false; @@ -10,7 +10,7 @@ index 9231c78..0336a67 100644 { // set the JLine output encoding to some reasonable default if it isn't already set -@@ -250,6 +251,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { +@@ -252,6 +253,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { public Shell(ConsoleReader reader) { super(); this.reader = reader; @@ -19,7 +19,7 @@ index 9231c78..0336a67 100644 } /** -@@ -262,6 +265,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { +@@ -264,6 +267,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { public boolean config(String... args) throws IOException { if (this.reader == null) this.reader = new ConsoleReader(); @@ -27,20 +27,21 @@ index 9231c78..0336a67 100644 + this.writer = new PrintWriter(new OutputStreamWriter(System.out, Charset.forName(System.getProperty("jline.WindowsTerminal.output.encoding", System.getProperty("file.encoding"))))); ShellOptionsJC options = new ShellOptionsJC(); JCommander jc = new JCommander(); - -@@ -646,9 +646,10 @@ public class Shell extends ShellOptions { + +@@ -726,10 +731,11 @@ public class Shell extends ShellOptions implements KeywordExecutable { } public void printInfo() throws IOException { -- reader.print("\n" + SHELL_DESCRIPTION + "\n" + "- \n" + "- version: " + Constants.VERSION + "\n" + "- instance name: " -+ writer.print("\n" + SHELL_DESCRIPTION + "\n" + "- \n" + "- version: " + Constants.VERSION + "\n" + "- instance name: " - + connector.getInstance().getInstanceName() + "\n" + "- instance id: " + connector.getInstance().getInstanceID() + "\n" + "- \n" +- reader.print("\n" + SHELL_DESCRIPTION + "\n" + "- \n" + "- version: " + Constants.VERSION + "\n" ++ writer.print("\n" + SHELL_DESCRIPTION + "\n" + "- \n" + "- version: " + Constants.VERSION + "\n" + + "- instance name: " + connector.getInstance().getInstanceName() + "\n" + "- instance id: " + + connector.getInstance().getInstanceID() + "\n" + "- \n" + "- type 'help' for a list of available commands\n" + "- \n"); + writer.flush(); reader.flush(); } - -@@ -676,7 +677,9 @@ public class Shell extends ShellOptions { + +@@ -761,7 +767,9 @@ public class Shell extends ShellOptions implements KeywordExecutable { } } sb.append("-\n"); diff --git a/native-code.patch b/native-code.patch index 70c7140..fa657dd 100644 --- a/native-code.patch +++ b/native-code.patch @@ -1,5 +1,5 @@ diff --git a/server/native/src/main/resources/Makefile b/server/native/src/main/resources/Makefile -index 9ffeefe..102c253 100644 +index 5434356..3911f57 100644 --- a/server/native/src/main/resources/Makefile +++ b/server/native/src/main/resources/Makefile @@ -30,7 +30,7 @@ ifeq ($(shell uname),Linux) @@ -12,15 +12,15 @@ index 9ffeefe..102c253 100644 ifeq ($(shell uname),Darwin) diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java -index f728a9b..4a056f0 100644 +index 536d0a2..5ed16bb 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java -@@ -69,7 +69,7 @@ public class NativeMap implements Iterable> { - // Load native library +@@ -73,7 +73,7 @@ public class NativeMap implements Iterable> { static { // Check standard directories -- List directories = new ArrayList<>(Arrays.asList(new File[] {new File("/usr/lib64"), new File("/usr/lib")})); -+ List directories = new ArrayList<>(Arrays.asList(new File[] {new File("/usr/lib64/accumulo"), new File("/usr/lib/accumulo")})); + List directories = new ArrayList<>( +- Arrays.asList(new File[] {new File("/usr/lib64"), new File("/usr/lib")})); ++ Arrays.asList(new File[] {new File("/usr/lib64/accumulo"), new File("/usr/lib/accumulo")})); // Check in ACCUMULO_HOME location, too String envAccumuloHome = System.getenv("ACCUMULO_HOME"); if (envAccumuloHome != null) { diff --git a/sources b/sources index 20cb99c..22f6b85 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (accumulo-1.8.1-src.tar.gz) = c6ed00bb668954e504a564c0fffc5d0aa876bce6df2b5419e7b431911cb8b9831640a6ac658f8ecca81d473395652683eb29a0ed1407ab0be0239697919cd9c2 +SHA512 (accumulo-1.9.1-src.tar.gz) = f7fdb5a18868a3a5a7df3b19303591f22677dcbc2afde48be3bed5309c68c113f54a46d1dc501755b5244f28362cf3a280b6ea9b439af4a6d19a4f88d7589d6d From c8b69a318fcb1424597897bb8aa58b8b377d3556 Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Wed, 11 Jul 2018 17:18:38 -0400 Subject: [PATCH 17/24] Add gcc-c++ and make BRs --- accumulo.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/accumulo.spec b/accumulo.spec index 20a03c2..e6de08a 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -6,7 +6,7 @@ Name: accumulo Version: 1.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 Group: Development/Libraries @@ -53,6 +53,7 @@ BuildRequires: auto-service BuildRequires: beust-jcommander BuildRequires: bouncycastle BuildRequires: exec-maven-plugin +BuildRequires: gcc-c++ BuildRequires: google-gson BuildRequires: guava BuildRequires: hadoop-client @@ -67,6 +68,7 @@ BuildRequires: jline2 BuildRequires: jpackage-utils BuildRequires: libthrift-java >= 0.10.0 BuildRequires: log4j12 +BuildRequires: make BuildRequires: maven-assembly-plugin BuildRequires: maven-local BuildRequires: mvn(javax.servlet:javax.servlet-api) @@ -543,6 +545,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Wed Jul 11 2018 Christopher Tubbs - 1.9.1-2 +- Add gcc-c++ and make BRs + * Fri Jul 06 2018 Christopher Tubbs - 1.9.1-1 - Update to 1.9.1 From 1fbe5dfa7bd896f83c86479ef5838e216cce80d5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 12 Jul 2018 19:57:08 +0000 Subject: [PATCH 18/24] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- accumulo.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accumulo.spec b/accumulo.spec index e6de08a..2eb261f 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -6,7 +6,7 @@ Name: accumulo Version: 1.9.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 Group: Development/Libraries @@ -545,6 +545,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Thu Jul 12 2018 Fedora Release Engineering - 1.9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Jul 11 2018 Christopher Tubbs - 1.9.1-2 - Add gcc-c++ and make BRs From c2aae08074ea0cea269643be816d08f30b398e89 Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Thu, 19 Jul 2018 13:32:51 -0400 Subject: [PATCH 19/24] Update to 1.9.2; fixes rhbz#1603190 --- .gitignore | 1 + accumulo.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 630ec7a..7e4ebb2 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /accumulo-1.6.6-src.tar.gz /accumulo-1.8.1-src.tar.gz /accumulo-1.9.1-src.tar.gz +/accumulo-1.9.2-src.tar.gz diff --git a/accumulo.spec b/accumulo.spec index 2eb261f..933b57a 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -5,8 +5,8 @@ %global main_class org.apache.%{name}.start.Main Name: accumulo -Version: 1.9.1 -Release: 3%{?dist} +Version: 1.9.2 +Release: 1%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 Group: Development/Libraries @@ -545,6 +545,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Thu Jul 19 2018 Christopher Tubbs - 1.9.2-1 +- Update to 1.9.2; fixes rhbz#1603190 + * Thu Jul 12 2018 Fedora Release Engineering - 1.9.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 22f6b85..67d2fb0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (accumulo-1.9.1-src.tar.gz) = f7fdb5a18868a3a5a7df3b19303591f22677dcbc2afde48be3bed5309c68c113f54a46d1dc501755b5244f28362cf3a280b6ea9b439af4a6d19a4f88d7589d6d +SHA512 (accumulo-1.9.2-src.tar.gz) = 38928ffa9e25796d1edf52075d2770e6bcfcf31a28b7a2bbc4dd90ffe2b34713bedabd8473ba6c3fd4387113f66856e9007240ece10955e5640c7682740b6b2b From cd511b71399172954ae3cf7e1a5ac26ada84db0d Mon Sep 17 00:00:00 2001 From: Severin Gehwolf Date: Thu, 30 Aug 2018 16:42:48 +0200 Subject: [PATCH 20/24] Require javapackages-tools over javapackages-filesystem. Post RHBZ#1600426 only javapackages-filesystem gets auto- generated. Fix -core sub-package to require javapackages-tools as main script uses java-functions. --- accumulo.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/accumulo.spec b/accumulo.spec index 933b57a..3e6476a 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -6,7 +6,7 @@ Name: accumulo Version: 1.9.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 Group: Development/Libraries @@ -106,6 +106,7 @@ Group: Applications/System BuildArch: noarch Requires(pre): /usr/sbin/useradd Requires: libthrift-java >= 0.10.0 +Requires: javapackages-tools Obsoletes: %{name}-javadoc < 1.6.0-5%{?dist} %description core @@ -545,6 +546,10 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Thu Aug 30 2018 Severin Gehwolf - 1.9.2-2 +- Require javapackages-tools for java-functions over just + javapackages-filesystem. See RHBZ#1600426. + * Thu Jul 19 2018 Christopher Tubbs - 1.9.2-1 - Update to 1.9.2; fixes rhbz#1603190 From cc9ce58609442d17386b71d83c7286c30976c9db Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:38 +0100 Subject: [PATCH 21/24] Remove obsolete Group tag Signed-off-by: Igor Gnatenko --- accumulo.spec | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/accumulo.spec b/accumulo.spec index 3e6476a..991f326 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -9,7 +9,6 @@ Version: 1.9.2 Release: 2%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 -Group: Development/Libraries URL: https://%{name}.apache.org Source0: https://www.apache.org/dist/%{name}/%{version}/%{name}-%{version}-src.tar.gz @@ -102,7 +101,6 @@ modify key/value pairs at various points in the data management process. Summary: Libraries for %{longproj} Java clients # the bloom filter code is BSD licensed, everything else is ASL 2.0 License: ASL 2.0 and BSD -Group: Applications/System BuildArch: noarch Requires(pre): /usr/sbin/useradd Requires: libthrift-java >= 0.10.0 @@ -121,7 +119,6 @@ This package provides libraries for %{longproj} clients. %package server-base Summary: The %{longproj} Server Base libraries License: ASL 2.0 -Group: Applications/System BuildArch: noarch Requires: %{name}-core = %{version}-%{release} @@ -137,7 +134,6 @@ This package provides jars for other %{longproj} services. %package master Summary: The %{longproj} Master service License: ASL 2.0 -Group: Applications/System BuildArch: noarch Requires: %{name}-core = %{version}-%{release} Requires: %{name}-server-base = %{version}-%{release} @@ -155,7 +151,6 @@ This package provides the master service for %{longproj}. %package tserver Summary: The %{longproj} TServer service License: ASL 2.0 -Group: Applications/System BuildArch: noarch Requires: %{name}-core = %{version}-%{release} Requires: %{name}-server-base = %{version}-%{release} @@ -173,7 +168,6 @@ This package provides the tserver service for %{longproj}. %package gc Summary: The %{longproj} Garbage Collector service License: ASL 2.0 -Group: Applications/System BuildArch: noarch Requires: %{name}-core = %{version}-%{release} Requires: %{name}-server-base = %{version}-%{release} @@ -191,7 +185,6 @@ This package provides the gc service for %{longproj}. %package monitor Summary: The %{longproj} Monitor service License: ASL 2.0 -Group: Applications/System BuildArch: noarch Requires: %{name}-core = %{version}-%{release} Requires: %{name}-server-base = %{version}-%{release} @@ -211,7 +204,6 @@ This package provides the monitor service for %{longproj}. %package tracer Summary: The %{longproj} Tracer service License: ASL 2.0 -Group: Applications/System BuildArch: noarch Requires: %{name}-core = %{version}-%{release} Requires: %{name}-server-base = %{version}-%{release} @@ -229,7 +221,6 @@ This package provides the tracer service for %{longproj}. %package examples Summary: Examples for %{longproj} License: ASL 2.0 -Group: Applications/System BuildArch: noarch Requires: %{name}-core = %{version}-%{release} @@ -245,7 +236,6 @@ This package provides examples for %{longproj}. %package native Summary: Native libraries for %{longproj} License: ASL 2.0 -Group: Development/Libraries Requires: %{name}-tserver = %{version}-%{release} %description native @@ -260,7 +250,6 @@ This package provides native code for %{longproj}'s TServer. %package shell Summary: Shell for %{longproj} License: ASL 2.0 -Group: Development/Libraries Requires: %{name}-core = %{version}-%{release} %description shell From 660822d37b93971c2e222fa4aee83adb26059d26 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 12:54:10 +0000 Subject: [PATCH 22/24] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- accumulo.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accumulo.spec b/accumulo.spec index 991f326..e10b7c5 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -6,7 +6,7 @@ Name: accumulo Version: 1.9.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 URL: https://%{name}.apache.org @@ -535,6 +535,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 1.9.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Aug 30 2018 Severin Gehwolf - 1.9.2-2 - Require javapackages-tools for java-functions over just javapackages-filesystem. See RHBZ#1600426. From a9fa5f6b1c1363b9307e1dce1ade99cf8bdf04b7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jul 2019 17:29:19 +0000 Subject: [PATCH 23/24] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- accumulo.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accumulo.spec b/accumulo.spec index e10b7c5..ac66108 100644 --- a/accumulo.spec +++ b/accumulo.spec @@ -6,7 +6,7 @@ Name: accumulo Version: 1.9.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A software platform for processing vast amounts of data License: ASL 2.0 URL: https://%{name}.apache.org @@ -535,6 +535,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" -- %systemd_post %{name}-monitor.service %changelog +* Wed Jul 24 2019 Fedora Release Engineering - 1.9.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Thu Jan 31 2019 Fedora Release Engineering - 1.9.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From cb2ee9d0b3b4a4f34cd42fd9dd009257a63ab4ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 2 Oct 2019 15:47:59 +0200 Subject: [PATCH 24/24] Orphaned for 6+ weeks --- .gitignore | 8 - ACCUMULO-4551-and-4584-backport.patch | 5439 ------------------------- accumulo-gc.service | 12 - accumulo-master.service | 12 - accumulo-monitor.service | 12 - accumulo-tracer.service | 12 - accumulo-tserver.service | 12 - accumulo.conf | 34 - accumulo.spec | 687 ---- dead.package | 1 + default-conf.patch | 92 - disabled-tests.patch | 40 - fix-jetty-9.4.patch | 12 - flot8.patch | 13 - guava.patch | 52 - jline-shell-workaround.patch | 54 - native-code.patch | 26 - sources | 1 - 18 files changed, 1 insertion(+), 6518 deletions(-) delete mode 100644 .gitignore delete mode 100644 ACCUMULO-4551-and-4584-backport.patch delete mode 100644 accumulo-gc.service delete mode 100644 accumulo-master.service delete mode 100644 accumulo-monitor.service delete mode 100644 accumulo-tracer.service delete mode 100644 accumulo-tserver.service delete mode 100644 accumulo.conf delete mode 100644 accumulo.spec create mode 100644 dead.package delete mode 100644 default-conf.patch delete mode 100644 disabled-tests.patch delete mode 100644 fix-jetty-9.4.patch delete mode 100644 flot8.patch delete mode 100644 guava.patch delete mode 100644 jline-shell-workaround.patch delete mode 100644 native-code.patch delete mode 100644 sources diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7e4ebb2..0000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -/accumulo-1.6.0-0616258.tar.gz -/accumulo-1.6.1-src.tar.gz -/accumulo-1.6.2-src.tar.gz -/accumulo-1.6.4-src.tar.gz -/accumulo-1.6.6-src.tar.gz -/accumulo-1.8.1-src.tar.gz -/accumulo-1.9.1-src.tar.gz -/accumulo-1.9.2-src.tar.gz diff --git a/ACCUMULO-4551-and-4584-backport.patch b/ACCUMULO-4551-and-4584-backport.patch deleted file mode 100644 index 8702d80..0000000 --- a/ACCUMULO-4551-and-4584-backport.patch +++ /dev/null @@ -1,5439 +0,0 @@ -diff --git a/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java b/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java -new file mode 100644 -index 0000000..9636fe5 ---- /dev/null -+++ b/core/src/main/java/org/apache/accumulo/core/rpc/TServiceClientWrapper.java -@@ -0,0 +1,56 @@ -+/* -+ * 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.accumulo.core.rpc; -+ -+import org.apache.thrift.TApplicationException; -+import org.apache.thrift.TBase; -+import org.apache.thrift.TException; -+import org.apache.thrift.TServiceClient; -+import org.apache.thrift.protocol.TMessage; -+import org.apache.thrift.protocol.TMessageType; -+import org.apache.thrift.protocol.TProtocol; -+ -+// Wrapper for THRIFT-4062 workaround; shouldn't be needed in newer versions -+// Also update generate-thrift.sh to stop using this -+public abstract class TServiceClientWrapper extends TServiceClient { -+ -+ public TServiceClientWrapper(TProtocol iprot, TProtocol oprot) { -+ super(iprot, oprot); -+ } -+ -+ public TServiceClientWrapper(TProtocol prot) { -+ super(prot); -+ } -+ -+ @Override -+ protected void receiveBase(TBase result, String methodName) throws TException { -+ TMessage msg = iprot_.readMessageBegin(); -+ if (msg.type == TMessageType.EXCEPTION) { -+ TApplicationException x = new TApplicationException(); -+ x.read(iprot_); -+ iprot_.readMessageEnd(); -+ throw x; -+ } -+ if (msg.seqid != seqid_) { -+ throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, String.format("%s failed: out of sequence response: expected %d but got %d", -+ methodName, seqid_, msg.seqid)); -+ } -+ result.read(iprot_); -+ iprot_.readMessageEnd(); -+ } -+ -+} -diff --git a/core/src/main/scripts/generate-thrift.sh b/core/src/main/scripts/generate-thrift.sh -index 691ea79..d189323 100755 ---- a/core/src/main/scripts/generate-thrift.sh -+++ b/core/src/main/scripts/generate-thrift.sh -@@ -26,7 +26,7 @@ - # INCLUDED_MODULES should be an array that includes other Maven modules with src/main/thrift directories - # Use INCLUDED_MODULES=(-) in calling scripts that require no other modules - # ======================================================================================================================== --[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.9.3' -+[[ -z $REQUIRED_THRIFT_VERSION ]] && REQUIRED_THRIFT_VERSION='0.10.0' - [[ -z $INCLUDED_MODULES ]] && INCLUDED_MODULES=(../server/tracer) - [[ -z $BASE_OUTPUT_PACKAGE ]] && BASE_OUTPUT_PACKAGE='org.apache.accumulo.core' - [[ -z $PACKAGES_TO_GENERATE ]] && PACKAGES_TO_GENERATE=(gc master tabletserver security client.impl data replication trace) -@@ -71,11 +71,16 @@ for f in src/main/thrift/*.thrift; do - thrift ${THRIFT_ARGS} --gen cpp "$f" || fail unable to generate cpp thrift classes - done - --# For all generated thrift code, suppress all warnings and add the LICENSE header --cs='@SuppressWarnings({"unchecked", "serial", "rawtypes", "unused"})' --es='@SuppressWarnings({"unused"})' --find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/"unchecked"/"unchecked", "unused"/' --find $BUILD_DIR/gen-java -name '*.java' -print0 | xargs -0 sed -i.orig -e 's/\(public enum [A-Z]\)/'"$es"' \1/' -+# For all generated thrift code, get rid of all warnings and add the LICENSE header -+ -+# workaround for THRIFT-4062; should be fixed in newer thrift versions -+find $BUILD_DIR/gen-java -name '*.java' -exec sed -i -e 's/\(org[.]apache[.]\)thrift\([.]TServiceClient\) /\1accumulo.core.rpc\2Wrapper /' {} + -+# upstream stopped doing import statements for classes, but overlooked enums; delete unused imports -+find $BUILD_DIR/gen-java -name '*.java' -exec grep -Zl '^public enum ' {} + | xargs -0 sed -i -e '/^import .*$/d' -+# add dummy method to suppress "unnecessary suppress warnings" for classes which don't have any unused variables -+# this only affects classes, enums aren't affected -+find $BUILD_DIR/gen-java -name '*.java' -exec grep -Zl '^public class ' {} + | xargs -0 sed -i -e 's/^[}]$/ private static void unusedMethod() {}\ -+}/' - - for lang in "${LANGUAGES_TO_GENERATE[@]}"; do - case $lang in -diff --git a/core/src/main/thrift/client.thrift b/core/src/main/thrift/client.thrift -index 38a8076..2268574 100644 ---- a/core/src/main/thrift/client.thrift -+++ b/core/src/main/thrift/client.thrift -@@ -129,15 +129,15 @@ service ClientService { - list getUserAuthorizations(3:trace.TInfo tinfo, 4:security.TCredentials credentials, 2:string principal) throws (1:ThriftSecurityException sec) - - // permissions-related methods -- bool hasSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte sysPerm) throws (1:ThriftSecurityException sec) -- bool hasTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte tblPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -- bool hasNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte tblNspcPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -- void grantSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec) -- void revokeSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:byte permission) throws (1:ThriftSecurityException sec) -- void grantTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -- void revokeTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -- void grantNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -- void revokeNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:byte permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -+ bool hasSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 sysPerm) throws (1:ThriftSecurityException sec) -+ bool hasTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 tblPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -+ bool hasNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 tblNspcPerm) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -+ void grantSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 permission) throws (1:ThriftSecurityException sec) -+ void revokeSystemPermission(4:trace.TInfo tinfo, 5:security.TCredentials credentials, 2:string principal, 3:i8 permission) throws (1:ThriftSecurityException sec) -+ void grantTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -+ void revokeTablePermission(5:trace.TInfo tinfo, 6:security.TCredentials credentials, 2:string principal, 3:string tableName, 4:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -+ void grantNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) -+ void revokeNamespacePermission(1:trace.TInfo tinfo, 2:security.TCredentials credentials, 3:string principal, 4:string ns, 5:i8 permission) throws (1:ThriftSecurityException sec, 2:ThriftTableOperationException tope) - - // configuration methods - map getConfiguration(2:trace.TInfo tinfo, 3:security.TCredentials credentials, 1:ConfigurationType type); -diff --git a/core/src/main/thrift/master.thrift b/core/src/main/thrift/master.thrift -index b959074..832c738 100644 ---- a/core/src/main/thrift/master.thrift -+++ b/core/src/main/thrift/master.thrift -@@ -113,7 +113,7 @@ struct DeadServer { - struct MasterMonitorInfo { - 1:map tableMap - 2:list tServerInfo -- 3:map badTServers -+ 3:map badTServers - 6:MasterState state - 8:MasterGoalState goalState - 7:i32 unassignedTablets -diff --git a/pom.xml b/pom.xml -index aea9399..b804ada 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -149,7 +149,7 @@ - false - - -- 0.9.3 -+ 0.10.0 - - 3.4.6 - -diff --git a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java -index 89c755d..5ab5263 100644 ---- a/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java -+++ b/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java -@@ -212,8 +212,7 @@ public class Proxy implements KeywordExecutable { - ProxyServer impl = new ProxyServer(properties); - - // Wrap the implementation -- translate some exceptions -- AccumuloProxy.Iface wrappedImpl = RpcWrapper.service(impl, -- new AccumuloProxy.Processor(impl)); -+ AccumuloProxy.Iface wrappedImpl = RpcWrapper.service(impl); - - // Create the processor from the implementation - TProcessor processor = new AccumuloProxy.Processor<>(wrappedImpl); -diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java -index b9df911..3e9d8d5 100644 ---- a/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java -+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/RpcWrapper.java -@@ -19,19 +19,11 @@ package org.apache.accumulo.server.rpc; - import java.lang.reflect.InvocationHandler; - import java.lang.reflect.Method; - import java.lang.reflect.Proxy; --import java.util.HashSet; --import java.util.Map; --import java.util.Map.Entry; --import java.util.Set; - - import org.apache.accumulo.core.trace.wrappers.RpcServerInvocationHandler; - import org.apache.accumulo.core.trace.wrappers.TraceWrap; --import org.apache.thrift.ProcessFunction; - import org.apache.thrift.TApplicationException; --import org.apache.thrift.TBaseProcessor; - import org.apache.thrift.TException; --import org.slf4j.Logger; --import org.slf4j.LoggerFactory; - - /** - * This class accommodates the changes in THRIFT-1805, which appeared in Thrift 0.9.1 and restricts -@@ -56,14 +48,9 @@ import org.slf4j.LoggerFactory; - * @since 1.6.1 - */ - public class RpcWrapper { -- private static final Logger log = LoggerFactory.getLogger(RpcWrapper.class); - -- public static I service(final I instance, final TBaseProcessor processor) { -- final Map> processorView = processor.getProcessMapView(); -- final Set onewayMethods = getOnewayMethods(processorView); -- log.debug("Found oneway Thrift methods: " + onewayMethods); -- -- InvocationHandler handler = getInvocationHandler(instance, onewayMethods); -+ public static I service(final I instance) { -+ InvocationHandler handler = getInvocationHandler(instance); - - @SuppressWarnings("unchecked") - I proxiedInstance = (I) Proxy.newProxyInstance(instance.getClass().getClassLoader(), -@@ -71,10 +58,8 @@ public class RpcWrapper { - return proxiedInstance; - } - -- protected static RpcServerInvocationHandler getInvocationHandler(final T instance, -- final Set onewayMethods) { -+ protected static RpcServerInvocationHandler getInvocationHandler(final T instance) { - return new RpcServerInvocationHandler(instance) { -- private final Logger log = LoggerFactory.getLogger(instance.getClass()); - - @Override - public Object invoke(Object obj, Method method, Object[] args) throws Throwable { -@@ -82,57 +67,10 @@ public class RpcWrapper { - try { - return super.invoke(obj, method, args); - } catch (RuntimeException e) { -- String msg = e.getMessage(); -- log.error(msg, e); -- if (onewayMethods.contains(method.getName())) { -- throw e; -- } -- throw new TException(msg); -- } catch (Error e) { -- String msg = e.getMessage(); -- log.error(msg, e); -- if (onewayMethods.contains(method.getName())) { -- throw e; -- } -- throw new TException(msg); -+ // thrift will log the exception in ProcessFunction -+ throw new TException(e); - } - } - }; - } -- -- protected static Set getOnewayMethods(Map processorView) { -- // Get a handle on the isOnewayMethod and make it accessible -- final Method isOnewayMethod; -- try { -- isOnewayMethod = ProcessFunction.class.getDeclaredMethod("isOneway"); -- } catch (NoSuchMethodException e) { -- throw new RuntimeException("Could not access isOneway method", e); -- } catch (SecurityException e) { -- throw new RuntimeException("Could not access isOneway method", e); -- } -- // In java7, this appears to be copying the method, but it's trivial for us to return the object -- // to how it was before. -- final boolean accessible = isOnewayMethod.isAccessible(); -- isOnewayMethod.setAccessible(true); -- -- try { -- final Set onewayMethods = new HashSet<>(); -- for (Entry entry : processorView.entrySet()) { -- try { -- if ((Boolean) isOnewayMethod.invoke(entry.getValue())) { -- onewayMethods.add(entry.getKey()); -- } -- } catch (RuntimeException e) { -- throw e; -- } catch (Exception e) { -- throw new RuntimeException(e); -- } -- } -- -- return onewayMethods; -- } finally { -- // Reset it back to how it was. -- isOnewayMethod.setAccessible(accessible); -- } -- } - } -diff --git a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java b/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java -deleted file mode 100644 -index a942325..0000000 ---- a/server/base/src/test/java/org/apache/accumulo/server/rpc/RpcWrapperTest.java -+++ /dev/null -@@ -1,307 +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.accumulo.server.rpc; -- --import java.util.Collections; --import java.util.HashMap; --import java.util.Map; --import java.util.Set; -- --import org.apache.accumulo.core.trace.wrappers.RpcServerInvocationHandler; --import org.apache.thrift.ProcessFunction; --import org.apache.thrift.TBase; --import org.apache.thrift.TException; --import org.apache.thrift.protocol.TProtocol; --import org.junit.Assert; --import org.junit.Test; -- --import com.google.common.collect.Sets; -- --/** -- * Verification that RpcWrapper correctly mangles Exceptions to work around Thrift. -- */ --public class RpcWrapperTest { -- -- private static final String RTE_MESSAGE = "RpcWrapperTest's RuntimeException Message"; -- -- /** -- * Given a method name and whether or not the method is oneway, construct a ProcessFunction. -- * -- * @param methodName -- * The service method name. -- * @param isOneway -- * Is the method oneway. -- * @return A ProcessFunction. -- */ -- private fake_proc createProcessFunction(String methodName, boolean isOneway) { -- return new fake_proc<>(methodName, isOneway); -- } -- -- @Test -- public void testSomeOnewayMethods() { -- Map> procs = new HashMap<>(); -- procs.put("foo", createProcessFunction("foo", true)); -- procs.put("foobar", createProcessFunction("foobar", false)); -- procs.put("bar", createProcessFunction("bar", true)); -- procs.put("barfoo", createProcessFunction("barfoo", false)); -- -- Set onewayMethods = RpcWrapper.getOnewayMethods(procs); -- Assert.assertEquals(Sets.newHashSet("foo", "bar"), onewayMethods); -- } -- -- @Test -- public void testNoOnewayMethods() { -- Map> procs = new HashMap<>(); -- procs.put("foo", createProcessFunction("foo", false)); -- procs.put("foobar", createProcessFunction("foobar", false)); -- procs.put("bar", createProcessFunction("bar", false)); -- procs.put("barfoo", createProcessFunction("barfoo", false)); -- -- Set onewayMethods = RpcWrapper.getOnewayMethods(procs); -- Assert.assertEquals(Collections. emptySet(), onewayMethods); -- } -- -- @Test -- public void testAllOnewayMethods() { -- Map> procs = new HashMap<>(); -- procs.put("foo", createProcessFunction("foo", true)); -- procs.put("foobar", createProcessFunction("foobar", true)); -- procs.put("bar", createProcessFunction("bar", true)); -- procs.put("barfoo", createProcessFunction("barfoo", true)); -- -- Set onewayMethods = RpcWrapper.getOnewayMethods(procs); -- Assert.assertEquals(Sets.newHashSet("foo", "foobar", "bar", "barfoo"), onewayMethods); -- } -- -- @Test -- public void testNoExceptionWrappingForOneway() throws Throwable { -- final Object[] args = new Object[0]; -- -- final FakeService impl = new FakeServiceImpl(); -- -- // "short" names throw RTEs and are oneway, while long names do not throw exceptions and are not -- // oneway. -- RpcServerInvocationHandler handler = RpcWrapper.getInvocationHandler(impl, -- Sets.newHashSet("foo", "bar")); -- -- // Should throw an exception, but not be wrapped because the method is oneway -- try { -- handler.invoke(impl, FakeServiceImpl.class.getMethod("foo"), args); -- Assert.fail("Expected an exception"); -- } catch (RuntimeException e) { -- Assert.assertEquals(RTE_MESSAGE, e.getMessage()); -- } -- -- // Should not throw an exception -- handler.invoke(impl, FakeServiceImpl.class.getMethod("foobar"), args); -- } -- -- @Test -- public void testExceptionWrappingForNonOneway() throws Throwable { -- final Object[] args = new Object[0]; -- -- final FakeService impl = new FakeServiceImpl(); -- -- // "short" names throw RTEs and are not oneway, while long names do not throw exceptions and are -- // oneway. -- RpcServerInvocationHandler handler = RpcWrapper.getInvocationHandler(impl, -- Sets.newHashSet("foobar", "barfoo")); -- -- // Should throw an exception, but not be wrapped because the method is oneway -- try { -- handler.invoke(impl, FakeServiceImpl.class.getMethod("foo"), args); -- Assert.fail("Expected an exception"); -- } catch (TException e) { -- // The InvocationHandler should take the exception from the RTE and make it a TException -- Assert.assertEquals(RTE_MESSAGE, e.getMessage()); -- } -- -- // Should not throw an exception -- handler.invoke(impl, FakeServiceImpl.class.getMethod("foobar"), args); -- } -- -- // -- // Some hacked together classes/interfaces that mimic what Thrift is doing. -- // -- -- /** -- * Some fake fields for our fake arguments. -- */ -- private static class fake_fields implements org.apache.thrift.TFieldIdEnum { -- @Override -- public short getThriftFieldId() { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public String getFieldName() { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public boolean equals(Object o) { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public int hashCode() { -- throw new UnsupportedOperationException(); -- } -- } -- -- /** -- * A fake thrift service -- */ -- interface FakeService { -- void foo(); -- -- String foobar(); -- -- int bar(); -- -- long barfoo(); -- } -- -- /** -- * An implementation of the fake thrift service. The "short" names throw RTEs, while long names do -- * not. -- */ -- public static class FakeServiceImpl implements FakeService { -- @Override -- public void foo() { -- throw new RuntimeException(RTE_MESSAGE); -- } -- -- @Override -- public String foobar() { -- return ""; -- } -- -- @Override -- public int bar() { -- throw new RuntimeException(RTE_MESSAGE); -- } -- -- @Override -- public long barfoo() { -- return 0; -- } -- } -- -- /** -- * A fake ProcessFunction implementation for testing that allows injection of method name and -- * oneway. -- */ -- private static class fake_proc -- extends org.apache.thrift.ProcessFunction { -- final private boolean isOneway; -- -- public fake_proc(String methodName, boolean isOneway) { -- super(methodName); -- this.isOneway = isOneway; -- } -- -- @Override -- protected boolean isOneway() { -- return isOneway; -- } -- -- @SuppressWarnings("rawtypes") -- @Override -- public TBase getResult(I iface, foo_args args) throws TException { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public foo_args getEmptyArgsInstance() { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public boolean equals(Object o) { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public int hashCode() { -- throw new UnsupportedOperationException(); -- } -- } -- -- /** -- * Fake arguments for our fake service. -- */ -- private static class foo_args implements org.apache.thrift.TBase { -- -- private static final long serialVersionUID = 1L; -- -- @Override -- public boolean equals(Object o) { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public int hashCode() { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public int compareTo(foo_args o) { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public void read(TProtocol iprot) throws TException { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public void write(TProtocol oprot) throws TException { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public fake_fields fieldForId(int fieldId) { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public boolean isSet(fake_fields field) { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public Object getFieldValue(fake_fields field) { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public void setFieldValue(fake_fields field, Object value) { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public TBase deepCopy() { -- throw new UnsupportedOperationException(); -- } -- -- @Override -- public void clear() { -- throw new UnsupportedOperationException(); -- } -- } --} -diff --git a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java -index ab6fa88..18d9377 100644 ---- a/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java -+++ b/server/base/src/test/java/org/apache/accumulo/server/util/TServerUtilsTest.java -@@ -354,7 +354,7 @@ public class TServerUtilsTest { - private ServerAddress startServer() throws Exception { - AccumuloServerContext ctx = new AccumuloServerContext(factory); - ClientServiceHandler clientHandler = new ClientServiceHandler(ctx, null, null); -- Iface rpcProxy = RpcWrapper.service(clientHandler, new Processor(clientHandler)); -+ Iface rpcProxy = RpcWrapper.service(clientHandler); - Processor processor = new Processor<>(rpcProxy); - // "localhost" explicitly to make sure we can always bind to that interface (avoids DNS - // misconfiguration) -diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java -index 0aeaaea..62f63f0 100644 ---- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java -+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java -@@ -751,7 +751,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements Ifa - } - - private HostAndPort startStatsService() throws UnknownHostException { -- Iface rpcProxy = RpcWrapper.service(this, new Processor(this)); -+ Iface rpcProxy = RpcWrapper.service(this); - final Processor processor; - if (ThriftServerType.SASL == getThriftServerType()) { - Iface tcProxy = TCredentialsUpdatingWrapper.service(rpcProxy, getClass(), getConfiguration()); -diff --git a/server/master/src/main/java/org/apache/accumulo/master/Master.java b/server/master/src/main/java/org/apache/accumulo/master/Master.java -index 9414b98..bac30b1 100644 ---- a/server/master/src/main/java/org/apache/accumulo/master/Master.java -+++ b/server/master/src/main/java/org/apache/accumulo/master/Master.java -@@ -1318,7 +1318,7 @@ public class Master extends AccumuloServerContext - } - - clientHandler = new MasterClientServiceHandler(this); -- Iface rpcProxy = RpcWrapper.service(clientHandler, new Processor(clientHandler)); -+ Iface rpcProxy = RpcWrapper.service(clientHandler); - final Processor processor; - if (ThriftServerType.SASL == getThriftServerType()) { - Iface tcredsProxy = TCredentialsUpdatingWrapper.service(rpcProxy, clientHandler.getClass(), -@@ -1358,8 +1358,7 @@ public class Master extends AccumuloServerContext - ReplicationCoordinator.Processor replicationCoordinatorProcessor = - new ReplicationCoordinator.Processor<>( - // @formatter:on -- RpcWrapper.service(impl, -- new ReplicationCoordinator.Processor(impl))); -+ RpcWrapper.service((ReplicationCoordinator.Iface) impl)); - ServerAddress replAddress = TServerUtils.startServer(this, hostname, - Property.MASTER_REPLICATION_COORDINATOR_PORT, replicationCoordinatorProcessor, - "Master Replication Coordinator", "Replication Coordinator", null, -diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java -index f87841d..6b5062c 100644 ---- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java -+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java -@@ -2508,7 +2508,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable { - private HostAndPort startTabletClientService() throws UnknownHostException { - // start listening for client connection last - clientHandler = new ThriftClientHandler(); -- Iface rpcProxy = RpcWrapper.service(clientHandler, new Processor(clientHandler)); -+ Iface rpcProxy = RpcWrapper.service(clientHandler); - final Processor processor; - if (ThriftServerType.SASL == getThriftServerType()) { - Iface tcredProxy = TCredentialsUpdatingWrapper.service(rpcProxy, ThriftClientHandler.class, -@@ -2525,8 +2525,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable { - - private HostAndPort startReplicationService() throws UnknownHostException { - final ReplicationServicerHandler handler = new ReplicationServicerHandler(this); -- ReplicationServicer.Iface rpcProxy = RpcWrapper.service(handler, -- new ReplicationServicer.Processor(handler)); -+ ReplicationServicer.Iface rpcProxy = RpcWrapper.service(handler); - ReplicationServicer.Iface repl = TCredentialsUpdatingWrapper.service(rpcProxy, - handler.getClass(), getConfiguration()); - // @formatter:off -diff --git a/test/pom.xml b/test/pom.xml -index f6a9d00..7ef55c4 100644 ---- a/test/pom.xml -+++ b/test/pom.xml -@@ -277,6 +277,29 @@ - - - -+ -+ thrift -+ -+ -+ -+ org.codehaus.mojo -+ exec-maven-plugin -+ -+ -+ generate-thrift -+ -+ exec -+ -+ generate-sources -+ -+ ${basedir}/src/main/scripts/generate-thrift.sh -+ -+ -+ -+ -+ -+ -+ - - - mrit -diff --git a/test/src/main/findbugs/exclude-filter.xml b/test/src/main/findbugs/exclude-filter.xml -index 3c3e596..9339c36 100644 ---- a/test/src/main/findbugs/exclude-filter.xml -+++ b/test/src/main/findbugs/exclude-filter.xml -@@ -15,6 +15,12 @@ - limitations under the License. - --> - -+ -+ -+ -+ -+ -+ - - - -diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/Mocket.java b/test/src/main/java/org/apache/accumulo/test/rpc/Mocket.java -new file mode 100644 -index 0000000..81c774d ---- /dev/null -+++ b/test/src/main/java/org/apache/accumulo/test/rpc/Mocket.java -@@ -0,0 +1,194 @@ -+/* -+ * 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.accumulo.test.rpc; -+ -+import java.util.Objects; -+import java.util.concurrent.LinkedBlockingQueue; -+import java.util.concurrent.TimeUnit; -+import java.util.concurrent.atomic.AtomicBoolean; -+ -+import org.apache.thrift.transport.TServerTransport; -+import org.apache.thrift.transport.TTransport; -+import org.apache.thrift.transport.TTransportException; -+ -+import com.google.common.base.Preconditions; -+ -+/** -+ * Mocket - a Mock Socket -+ *

-+ * Implements a bi-directional client-server transport in memory, using two FIFO queues. The output stream of the client is wired to the input stream of the -+ * server, and the output stream of the server is wired to the input stream of the client. -+ */ -+public class Mocket { -+ -+ private final TTransport clientTransport; -+ private final TServerTransport serverTransport; -+ private final AtomicBoolean closed = new AtomicBoolean(false); -+ -+ public Mocket() { -+ Buffer serverQueue = new Buffer(); -+ Buffer clientQueue = new Buffer(); -+ // wire up the two queues to each other -+ clientTransport = new MocketTransport(clientQueue, serverQueue); -+ serverTransport = new MocketServerTransport(new MocketTransport(serverQueue, clientQueue)); -+ -+ } -+ -+ public TServerTransport getServerTransport() { -+ return serverTransport; -+ } -+ -+ public TTransport getClientTransport() { -+ return clientTransport; -+ } -+ -+ private boolean isMocketClosed() { -+ return closed.get(); -+ } -+ -+ private void closeMocket() { -+ closed.set(true); -+ } -+ -+ private class Buffer { -+ -+ private final LinkedBlockingQueue queue = new LinkedBlockingQueue<>(); -+ -+ public void write(int b) { -+ queue.add(b); -+ } -+ -+ public void write(byte[] buf, int off, int len) { -+ Objects.requireNonNull(buf); -+ Preconditions.checkPositionIndexes(off, off + len, buf.length); -+ if (len == 0) { -+ return; -+ } -+ for (int i = 0; i < len; i++) { -+ write(buf[off + i]); -+ } -+ } -+ -+ public int read() { -+ Integer item; -+ // item = queue.take(); -+ // loop below makes sure we don't block indefinitely -+ while (!isMocketClosed()) { -+ try { -+ item = queue.poll(10, TimeUnit.MILLISECONDS); -+ } catch (InterruptedException e) { -+ // reset interrupt flag before returning -+ Thread.currentThread().interrupt(); -+ closeMocket(); -+ return -1; -+ } -+ // null means the timeout was reached -+ if (item != null) { -+ return item; -+ } -+ } -+ return -1; -+ } -+ -+ public int read(byte[] buf, int off, int len) { -+ Objects.requireNonNull(buf); -+ Preconditions.checkPositionIndexes(off, off + len, buf.length); -+ if (len == 0) { -+ return 0; -+ } -+ int c = read(); -+ if (c == -1) { -+ return -1; -+ } -+ buf[off] = (byte) c; -+ -+ int i; -+ for (i = 1; i < len; i++) { -+ c = read(); -+ if (c == -1) { -+ break; -+ } -+ buf[off + i] = (byte) c; -+ } -+ return i; -+ } -+ -+ } -+ -+ private class MocketServerTransport extends TServerTransport { -+ -+ private final MocketTransport servTrans; -+ -+ public MocketServerTransport(MocketTransport mocketTransport) { -+ servTrans = mocketTransport; -+ } -+ -+ @Override -+ public void listen() throws TTransportException {} -+ -+ @Override -+ public void close() { -+ acceptImpl().close(); -+ } -+ -+ @Override -+ protected TTransport acceptImpl() { -+ return servTrans; -+ } -+ -+ @Override -+ public void interrupt() { -+ close(); -+ } -+ -+ } -+ -+ private class MocketTransport extends TTransport { -+ -+ private final Buffer input; -+ private final Buffer output; -+ -+ private MocketTransport(Buffer input, Buffer output) { -+ this.input = input; -+ this.output = output; -+ } -+ -+ @Override -+ public void write(byte[] buf, int off, int len) throws TTransportException { -+ output.write(buf, off, len); -+ } -+ -+ @Override -+ public int read(byte[] buf, int off, int len) throws TTransportException { -+ return input.read(buf, off, len); -+ } -+ -+ @Override -+ public void open() throws TTransportException {} -+ -+ @Override -+ public boolean isOpen() { -+ return !isMocketClosed(); -+ } -+ -+ @Override -+ public void close() { -+ closeMocket(); -+ } -+ } -+ -+} -diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceHandler.java b/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceHandler.java -new file mode 100644 -index 0000000..02db55c ---- /dev/null -+++ b/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceHandler.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.accumulo.test.rpc; -+ -+import org.apache.accumulo.test.rpc.thrift.SimpleThriftService; -+import org.apache.thrift.TException; -+ -+public class SimpleThriftServiceHandler implements SimpleThriftService.Iface { -+ -+ private void setProp(String method, String value) { -+ System.setProperty(this.getClass().getSimpleName() + "." + method, value); -+ } -+ -+ @Override -+ public String echoFail(String value) throws TException { -+ setProp("echoFail", value); -+ throw new TException(new UnsupportedOperationException(value)); -+ } -+ -+ @Override -+ public String echoRuntimeFail(String value) { -+ setProp("echoRuntimeFail", value); -+ throw new UnsupportedOperationException(value); -+ } -+ -+ @Override -+ public String echoPass(String value) { -+ setProp("echoPass", value); -+ return value; -+ } -+ -+ @Override -+ public void onewayFail(String value) throws TException { -+ setProp("onewayFail", value); -+ throw new TException(new UnsupportedOperationException(value)); -+ } -+ -+ @Override -+ public void onewayRuntimeFail(String value) { -+ setProp("onewayRuntimeFail", value); -+ throw new UnsupportedOperationException(value); -+ } -+ -+ @Override -+ public void onewayPass(String value) { -+ setProp("onewayPass", value); -+ } -+ -+} -diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceRunner.java b/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceRunner.java -new file mode 100644 -index 0000000..f2865c2 ---- /dev/null -+++ b/test/src/main/java/org/apache/accumulo/test/rpc/SimpleThriftServiceRunner.java -@@ -0,0 +1,75 @@ -+/* -+ * 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.accumulo.test.rpc; -+ -+import org.apache.accumulo.server.rpc.RpcWrapper; -+import org.apache.accumulo.test.rpc.thrift.SimpleThriftService; -+import org.apache.thrift.protocol.TBinaryProtocol; -+import org.apache.thrift.server.TServer; -+import org.apache.thrift.server.TSimpleServer; -+ -+/** -+ * A utility for starting a simple thrift server, and providing a corresponding client for in-memory testing of thrift behavior -+ */ -+public class SimpleThriftServiceRunner { -+ -+ private SimpleThriftServiceHandler handler = new SimpleThriftServiceHandler(); -+ -+ private final Mocket mocket; -+ private final Thread serviceThread; -+ private final TServer server; -+ -+ public SimpleThriftServiceRunner(String threadName, boolean useWrapper) { -+ this.mocket = new Mocket(); -+ this.server = createServer(useWrapper); -+ this.serviceThread = new Thread(() -> server.serve(), threadName); -+ } -+ -+ public void startService() { -+ serviceThread.start(); -+ } -+ -+ public SimpleThriftServiceHandler handler() { -+ return handler; -+ } -+ -+ public SimpleThriftService.Client client() { -+ return new SimpleThriftService.Client(new TBinaryProtocol(mocket.getClientTransport())); -+ } -+ -+ private TServer createServer(boolean useWrapper) { -+ TServer.Args args = new TServer.Args(mocket.getServerTransport()); -+ SimpleThriftService.Iface actualHandler = handler; -+ if (useWrapper) { -+ actualHandler = RpcWrapper. service(handler); -+ } -+ args.processor(new SimpleThriftService.Processor<>(actualHandler)); -+ args.protocolFactory(new TBinaryProtocol.Factory()); -+ return new TSimpleServer(args); -+ } -+ -+ public void stopService() { -+ server.stop(); -+ try { -+ serviceThread.join(); -+ } catch (InterruptedException e) { -+ // re-set interrupt flag -+ Thread.currentThread().interrupt(); -+ } -+ } -+ -+} -diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/ThriftBehaviorIT.java b/test/src/main/java/org/apache/accumulo/test/rpc/ThriftBehaviorIT.java -new file mode 100644 -index 0000000..ee6fa08 ---- /dev/null -+++ b/test/src/main/java/org/apache/accumulo/test/rpc/ThriftBehaviorIT.java -@@ -0,0 +1,193 @@ -+/* -+ * 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.accumulo.test.rpc; -+ -+import java.util.Arrays; -+import java.util.HashMap; -+import java.util.Map; -+import java.util.concurrent.TimeUnit; -+ -+import org.apache.accumulo.test.categories.SunnyDayTests; -+import org.apache.accumulo.test.rpc.thrift.SimpleThriftService; -+import org.apache.log4j.Level; -+import org.apache.log4j.Logger; -+import org.apache.thrift.ProcessFunction; -+import org.apache.thrift.TApplicationException; -+import org.apache.thrift.TException; -+import org.apache.thrift.server.TSimpleServer; -+import org.hamcrest.core.IsInstanceOf; -+import org.junit.After; -+import org.junit.Assert; -+import org.junit.Before; -+import org.junit.Rule; -+import org.junit.Test; -+import org.junit.experimental.categories.Category; -+import org.junit.rules.ExpectedException; -+import org.junit.rules.TestName; -+import org.junit.rules.Timeout; -+ -+@Category(SunnyDayTests.class) -+public class ThriftBehaviorIT { -+ -+ @Rule -+ public Timeout timeout = new Timeout(5, TimeUnit.SECONDS); -+ -+ @Rule -+ public TestName testName = new TestName(); -+ -+ @Rule -+ public ExpectedException exception = ExpectedException.none(); -+ -+ private SimpleThriftService.Client client; -+ private SimpleThriftServiceHandler handler; -+ private SimpleThriftServiceRunner serviceRunner; -+ private String propName; -+ private Map oldLogLevels = new HashMap<>(); -+ -+ private static final String KITTY_MSG = "🐈 Kitty! 🐈"; -+ -+ // can delete wrapper when tests pass without using it (assuming tests are good enough) -+ private static final boolean USE_RPC_WRAPPER = true; -+ -+ private static final boolean SUPPRESS_SPAMMY_LOGGERS = true; -+ -+ @Before -+ public void createClientAndServer() { -+ Arrays.stream(new Class[] {TSimpleServer.class, ProcessFunction.class}).forEach(spammyClass -> { -+ Logger spammyLogger = Logger.getLogger(spammyClass); -+ oldLogLevels.put(spammyLogger, spammyLogger.getLevel()); -+ if (SUPPRESS_SPAMMY_LOGGERS) { -+ spammyLogger.setLevel(Level.OFF); -+ } -+ }); -+ -+ String threadName = ThriftBehaviorIT.class.getSimpleName() + "." + testName.getMethodName(); -+ serviceRunner = new SimpleThriftServiceRunner(threadName, USE_RPC_WRAPPER); -+ serviceRunner.startService(); -+ client = serviceRunner.client(); -+ handler = serviceRunner.handler(); -+ -+ propName = testName.getMethodName(); -+ if (propName.endsWith("Handler")) { -+ propName = propName.substring(0, propName.length() - 7); -+ } -+ propName = SimpleThriftServiceHandler.class.getSimpleName() + "." + propName; -+ -+ // make sure the property is reset before the test runs -+ System.setProperty(propName, "-"); -+ Assert.assertEquals("-", System.getProperty(propName)); -+ } -+ -+ @After -+ public void shutdownServer() { -+ serviceRunner.stopService(); -+ -+ oldLogLevels.forEach((spammyLogger, oldLevel) -> { -+ spammyLogger.setLevel(oldLevel); -+ }); -+ -+ // make sure the method was actually executed by the service handler -+ Assert.assertEquals(KITTY_MSG, System.getProperty(propName)); -+ } -+ -+ @Test -+ public void echoFailHandler() throws TException { -+ exception.expect(TException.class); -+ exception.expectCause(IsInstanceOf.instanceOf(UnsupportedOperationException.class)); -+ handler.echoFail(KITTY_MSG); -+ } -+ -+ @Test -+ public void echoFail() throws TException { -+ try { -+ client.echoFail(KITTY_MSG); -+ Assert.fail("Thrift client did not throw an expected exception"); -+ } catch (Exception e) { -+ Assert.assertEquals(TApplicationException.class.getName(), e.getClass().getName()); -+ } -+ // verify normal two-way method still passes using same client -+ echoPass(); -+ } -+ -+ @Test -+ public void echoRuntimeFailHandler() throws TException { -+ exception.expect(UnsupportedOperationException.class); -+ handler.echoRuntimeFail(KITTY_MSG); -+ } -+ -+ @Test -+ public void echoRuntimeFail() throws TException { -+ try { -+ client.echoRuntimeFail(KITTY_MSG); -+ Assert.fail("Thrift client did not throw an expected exception"); -+ } catch (Exception e) { -+ Assert.assertEquals(TApplicationException.class.getName(), e.getClass().getName()); -+ } -+ // verify normal two-way method still passes using same client -+ echoPass(); -+ } -+ -+ @Test -+ public void echoPassHandler() { -+ Assert.assertEquals(KITTY_MSG, handler.echoPass(KITTY_MSG)); -+ } -+ -+ @Test -+ public void echoPass() throws TException { -+ Assert.assertEquals(KITTY_MSG, client.echoPass(KITTY_MSG)); -+ } -+ -+ @Test -+ public void onewayFailHandler() throws TException { -+ exception.expect(TException.class); -+ exception.expectCause(IsInstanceOf.instanceOf(UnsupportedOperationException.class)); -+ handler.onewayFail(KITTY_MSG); -+ } -+ -+ @Test -+ public void onewayFail() throws TException { -+ client.onewayFail(KITTY_MSG); -+ // verify normal two-way method still passes using same client -+ echoPass(); -+ } -+ -+ @Test -+ public void onewayRuntimeFailHandler() throws TException { -+ exception.expect(UnsupportedOperationException.class); -+ handler.onewayRuntimeFail(KITTY_MSG); -+ } -+ -+ @Test -+ public void onewayRuntimeFail() throws TException { -+ client.onewayRuntimeFail(KITTY_MSG); -+ // verify normal two-way method still passes using same client -+ echoPass(); -+ } -+ -+ @Test -+ public void onewayPassHandler() { -+ handler.onewayPass(KITTY_MSG); -+ } -+ -+ @Test -+ public void onewayPass() throws TException { -+ client.onewayPass(KITTY_MSG); -+ // verify normal two-way method still passes using same client -+ echoPass(); -+ } -+ -+} -diff --git a/test/src/main/java/org/apache/accumulo/test/rpc/thrift/SimpleThriftService.java b/test/src/main/java/org/apache/accumulo/test/rpc/thrift/SimpleThriftService.java -new file mode 100644 -index 0000000..d76a789 ---- /dev/null -+++ b/test/src/main/java/org/apache/accumulo/test/rpc/thrift/SimpleThriftService.java -@@ -0,0 +1,4103 @@ -+/* -+ * 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. -+ */ -+/** -+ * Autogenerated by Thrift Compiler (0.10.0) -+ * -+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -+ * @generated -+ */ -+package org.apache.accumulo.test.rpc.thrift; -+ -+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") -+public class SimpleThriftService { -+ -+ public interface Iface { -+ -+ public java.lang.String echoPass(java.lang.String value) throws org.apache.thrift.TException; -+ -+ public void onewayPass(java.lang.String value) throws org.apache.thrift.TException; -+ -+ public java.lang.String echoFail(java.lang.String value) throws org.apache.thrift.TException; -+ -+ public void onewayFail(java.lang.String value) throws org.apache.thrift.TException; -+ -+ public java.lang.String echoRuntimeFail(java.lang.String value) throws org.apache.thrift.TException; -+ -+ public void onewayRuntimeFail(java.lang.String value) throws org.apache.thrift.TException; -+ -+ } -+ -+ public interface AsyncIface { -+ -+ public void echoPass(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; -+ -+ public void onewayPass(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; -+ -+ public void echoFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; -+ -+ public void onewayFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; -+ -+ public void echoRuntimeFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; -+ -+ public void onewayRuntimeFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; -+ -+ } -+ -+ public static class Client extends org.apache.accumulo.core.rpc.TServiceClientWrapper implements Iface { -+ public static class Factory implements org.apache.thrift.TServiceClientFactory { -+ public Factory() {} -+ public Client getClient(org.apache.thrift.protocol.TProtocol prot) { -+ return new Client(prot); -+ } -+ public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { -+ return new Client(iprot, oprot); -+ } -+ } -+ -+ public Client(org.apache.thrift.protocol.TProtocol prot) -+ { -+ super(prot, prot); -+ } -+ -+ public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { -+ super(iprot, oprot); -+ } -+ -+ public java.lang.String echoPass(java.lang.String value) throws org.apache.thrift.TException -+ { -+ send_echoPass(value); -+ return recv_echoPass(); -+ } -+ -+ public void send_echoPass(java.lang.String value) throws org.apache.thrift.TException -+ { -+ echoPass_args args = new echoPass_args(); -+ args.setValue(value); -+ sendBase("echoPass", args); -+ } -+ -+ public java.lang.String recv_echoPass() throws org.apache.thrift.TException -+ { -+ echoPass_result result = new echoPass_result(); -+ receiveBase(result, "echoPass"); -+ if (result.isSetSuccess()) { -+ return result.success; -+ } -+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "echoPass failed: unknown result"); -+ } -+ -+ public void onewayPass(java.lang.String value) throws org.apache.thrift.TException -+ { -+ send_onewayPass(value); -+ } -+ -+ public void send_onewayPass(java.lang.String value) throws org.apache.thrift.TException -+ { -+ onewayPass_args args = new onewayPass_args(); -+ args.setValue(value); -+ sendBaseOneway("onewayPass", args); -+ } -+ -+ public java.lang.String echoFail(java.lang.String value) throws org.apache.thrift.TException -+ { -+ send_echoFail(value); -+ return recv_echoFail(); -+ } -+ -+ public void send_echoFail(java.lang.String value) throws org.apache.thrift.TException -+ { -+ echoFail_args args = new echoFail_args(); -+ args.setValue(value); -+ sendBase("echoFail", args); -+ } -+ -+ public java.lang.String recv_echoFail() throws org.apache.thrift.TException -+ { -+ echoFail_result result = new echoFail_result(); -+ receiveBase(result, "echoFail"); -+ if (result.isSetSuccess()) { -+ return result.success; -+ } -+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "echoFail failed: unknown result"); -+ } -+ -+ public void onewayFail(java.lang.String value) throws org.apache.thrift.TException -+ { -+ send_onewayFail(value); -+ } -+ -+ public void send_onewayFail(java.lang.String value) throws org.apache.thrift.TException -+ { -+ onewayFail_args args = new onewayFail_args(); -+ args.setValue(value); -+ sendBaseOneway("onewayFail", args); -+ } -+ -+ public java.lang.String echoRuntimeFail(java.lang.String value) throws org.apache.thrift.TException -+ { -+ send_echoRuntimeFail(value); -+ return recv_echoRuntimeFail(); -+ } -+ -+ public void send_echoRuntimeFail(java.lang.String value) throws org.apache.thrift.TException -+ { -+ echoRuntimeFail_args args = new echoRuntimeFail_args(); -+ args.setValue(value); -+ sendBase("echoRuntimeFail", args); -+ } -+ -+ public java.lang.String recv_echoRuntimeFail() throws org.apache.thrift.TException -+ { -+ echoRuntimeFail_result result = new echoRuntimeFail_result(); -+ receiveBase(result, "echoRuntimeFail"); -+ if (result.isSetSuccess()) { -+ return result.success; -+ } -+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "echoRuntimeFail failed: unknown result"); -+ } -+ -+ public void onewayRuntimeFail(java.lang.String value) throws org.apache.thrift.TException -+ { -+ send_onewayRuntimeFail(value); -+ } -+ -+ public void send_onewayRuntimeFail(java.lang.String value) throws org.apache.thrift.TException -+ { -+ onewayRuntimeFail_args args = new onewayRuntimeFail_args(); -+ args.setValue(value); -+ sendBaseOneway("onewayRuntimeFail", args); -+ } -+ -+ } -+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { -+ public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { -+ private org.apache.thrift.async.TAsyncClientManager clientManager; -+ private org.apache.thrift.protocol.TProtocolFactory protocolFactory; -+ public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { -+ this.clientManager = clientManager; -+ this.protocolFactory = protocolFactory; -+ } -+ public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { -+ return new AsyncClient(protocolFactory, clientManager, transport); -+ } -+ } -+ -+ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { -+ super(protocolFactory, clientManager, transport); -+ } -+ -+ public void echoPass(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ checkReady(); -+ echoPass_call method_call = new echoPass_call(value, resultHandler, this, ___protocolFactory, ___transport); -+ this.___currentMethod = method_call; -+ ___manager.call(method_call); -+ } -+ -+ public static class echoPass_call extends org.apache.thrift.async.TAsyncMethodCall { -+ private java.lang.String value; -+ public echoPass_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { -+ super(client, protocolFactory, transport, resultHandler, false); -+ this.value = value; -+ } -+ -+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { -+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("echoPass", org.apache.thrift.protocol.TMessageType.CALL, 0)); -+ echoPass_args args = new echoPass_args(); -+ args.setValue(value); -+ args.write(prot); -+ prot.writeMessageEnd(); -+ } -+ -+ public java.lang.String getResult() throws org.apache.thrift.TException { -+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { -+ throw new java.lang.IllegalStateException("Method call not finished!"); -+ } -+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); -+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); -+ return (new Client(prot)).recv_echoPass(); -+ } -+ } -+ -+ public void onewayPass(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ checkReady(); -+ onewayPass_call method_call = new onewayPass_call(value, resultHandler, this, ___protocolFactory, ___transport); -+ this.___currentMethod = method_call; -+ ___manager.call(method_call); -+ } -+ -+ public static class onewayPass_call extends org.apache.thrift.async.TAsyncMethodCall { -+ private java.lang.String value; -+ public onewayPass_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { -+ super(client, protocolFactory, transport, resultHandler, true); -+ this.value = value; -+ } -+ -+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { -+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayPass", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); -+ onewayPass_args args = new onewayPass_args(); -+ args.setValue(value); -+ args.write(prot); -+ prot.writeMessageEnd(); -+ } -+ -+ public Void getResult() throws org.apache.thrift.TException { -+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { -+ throw new java.lang.IllegalStateException("Method call not finished!"); -+ } -+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); -+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); -+ return null; -+ } -+ } -+ -+ public void echoFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ checkReady(); -+ echoFail_call method_call = new echoFail_call(value, resultHandler, this, ___protocolFactory, ___transport); -+ this.___currentMethod = method_call; -+ ___manager.call(method_call); -+ } -+ -+ public static class echoFail_call extends org.apache.thrift.async.TAsyncMethodCall { -+ private java.lang.String value; -+ public echoFail_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { -+ super(client, protocolFactory, transport, resultHandler, false); -+ this.value = value; -+ } -+ -+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { -+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("echoFail", org.apache.thrift.protocol.TMessageType.CALL, 0)); -+ echoFail_args args = new echoFail_args(); -+ args.setValue(value); -+ args.write(prot); -+ prot.writeMessageEnd(); -+ } -+ -+ public java.lang.String getResult() throws org.apache.thrift.TException { -+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { -+ throw new java.lang.IllegalStateException("Method call not finished!"); -+ } -+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); -+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); -+ return (new Client(prot)).recv_echoFail(); -+ } -+ } -+ -+ public void onewayFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ checkReady(); -+ onewayFail_call method_call = new onewayFail_call(value, resultHandler, this, ___protocolFactory, ___transport); -+ this.___currentMethod = method_call; -+ ___manager.call(method_call); -+ } -+ -+ public static class onewayFail_call extends org.apache.thrift.async.TAsyncMethodCall { -+ private java.lang.String value; -+ public onewayFail_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { -+ super(client, protocolFactory, transport, resultHandler, true); -+ this.value = value; -+ } -+ -+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { -+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayFail", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); -+ onewayFail_args args = new onewayFail_args(); -+ args.setValue(value); -+ args.write(prot); -+ prot.writeMessageEnd(); -+ } -+ -+ public Void getResult() throws org.apache.thrift.TException { -+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { -+ throw new java.lang.IllegalStateException("Method call not finished!"); -+ } -+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); -+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); -+ return null; -+ } -+ } -+ -+ public void echoRuntimeFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ checkReady(); -+ echoRuntimeFail_call method_call = new echoRuntimeFail_call(value, resultHandler, this, ___protocolFactory, ___transport); -+ this.___currentMethod = method_call; -+ ___manager.call(method_call); -+ } -+ -+ public static class echoRuntimeFail_call extends org.apache.thrift.async.TAsyncMethodCall { -+ private java.lang.String value; -+ public echoRuntimeFail_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { -+ super(client, protocolFactory, transport, resultHandler, false); -+ this.value = value; -+ } -+ -+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { -+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("echoRuntimeFail", org.apache.thrift.protocol.TMessageType.CALL, 0)); -+ echoRuntimeFail_args args = new echoRuntimeFail_args(); -+ args.setValue(value); -+ args.write(prot); -+ prot.writeMessageEnd(); -+ } -+ -+ public java.lang.String getResult() throws org.apache.thrift.TException { -+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { -+ throw new java.lang.IllegalStateException("Method call not finished!"); -+ } -+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); -+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); -+ return (new Client(prot)).recv_echoRuntimeFail(); -+ } -+ } -+ -+ public void onewayRuntimeFail(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ checkReady(); -+ onewayRuntimeFail_call method_call = new onewayRuntimeFail_call(value, resultHandler, this, ___protocolFactory, ___transport); -+ this.___currentMethod = method_call; -+ ___manager.call(method_call); -+ } -+ -+ public static class onewayRuntimeFail_call extends org.apache.thrift.async.TAsyncMethodCall { -+ private java.lang.String value; -+ public onewayRuntimeFail_call(java.lang.String value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { -+ super(client, protocolFactory, transport, resultHandler, true); -+ this.value = value; -+ } -+ -+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { -+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("onewayRuntimeFail", org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); -+ onewayRuntimeFail_args args = new onewayRuntimeFail_args(); -+ args.setValue(value); -+ args.write(prot); -+ prot.writeMessageEnd(); -+ } -+ -+ public Void getResult() throws org.apache.thrift.TException { -+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { -+ throw new java.lang.IllegalStateException("Method call not finished!"); -+ } -+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); -+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); -+ return null; -+ } -+ } -+ -+ } -+ -+ public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { -+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName()); -+ public Processor(I iface) { -+ super(iface, getProcessMap(new java.util.HashMap>())); -+ } -+ -+ protected Processor(I iface, java.util.Map> processMap) { -+ super(iface, getProcessMap(processMap)); -+ } -+ -+ private static java.util.Map> getProcessMap(java.util.Map> processMap) { -+ processMap.put("echoPass", new echoPass()); -+ processMap.put("onewayPass", new onewayPass()); -+ processMap.put("echoFail", new echoFail()); -+ processMap.put("onewayFail", new onewayFail()); -+ processMap.put("echoRuntimeFail", new echoRuntimeFail()); -+ processMap.put("onewayRuntimeFail", new onewayRuntimeFail()); -+ return processMap; -+ } -+ -+ public static class echoPass extends org.apache.thrift.ProcessFunction { -+ public echoPass() { -+ super("echoPass"); -+ } -+ -+ public echoPass_args getEmptyArgsInstance() { -+ return new echoPass_args(); -+ } -+ -+ protected boolean isOneway() { -+ return false; -+ } -+ -+ public echoPass_result getResult(I iface, echoPass_args args) throws org.apache.thrift.TException { -+ echoPass_result result = new echoPass_result(); -+ result.success = iface.echoPass(args.value); -+ return result; -+ } -+ } -+ -+ public static class onewayPass extends org.apache.thrift.ProcessFunction { -+ public onewayPass() { -+ super("onewayPass"); -+ } -+ -+ public onewayPass_args getEmptyArgsInstance() { -+ return new onewayPass_args(); -+ } -+ -+ protected boolean isOneway() { -+ return true; -+ } -+ -+ public org.apache.thrift.TBase getResult(I iface, onewayPass_args args) throws org.apache.thrift.TException { -+ iface.onewayPass(args.value); -+ return null; -+ } -+ } -+ -+ public static class echoFail extends org.apache.thrift.ProcessFunction { -+ public echoFail() { -+ super("echoFail"); -+ } -+ -+ public echoFail_args getEmptyArgsInstance() { -+ return new echoFail_args(); -+ } -+ -+ protected boolean isOneway() { -+ return false; -+ } -+ -+ public echoFail_result getResult(I iface, echoFail_args args) throws org.apache.thrift.TException { -+ echoFail_result result = new echoFail_result(); -+ result.success = iface.echoFail(args.value); -+ return result; -+ } -+ } -+ -+ public static class onewayFail extends org.apache.thrift.ProcessFunction { -+ public onewayFail() { -+ super("onewayFail"); -+ } -+ -+ public onewayFail_args getEmptyArgsInstance() { -+ return new onewayFail_args(); -+ } -+ -+ protected boolean isOneway() { -+ return true; -+ } -+ -+ public org.apache.thrift.TBase getResult(I iface, onewayFail_args args) throws org.apache.thrift.TException { -+ iface.onewayFail(args.value); -+ return null; -+ } -+ } -+ -+ public static class echoRuntimeFail extends org.apache.thrift.ProcessFunction { -+ public echoRuntimeFail() { -+ super("echoRuntimeFail"); -+ } -+ -+ public echoRuntimeFail_args getEmptyArgsInstance() { -+ return new echoRuntimeFail_args(); -+ } -+ -+ protected boolean isOneway() { -+ return false; -+ } -+ -+ public echoRuntimeFail_result getResult(I iface, echoRuntimeFail_args args) throws org.apache.thrift.TException { -+ echoRuntimeFail_result result = new echoRuntimeFail_result(); -+ result.success = iface.echoRuntimeFail(args.value); -+ return result; -+ } -+ } -+ -+ public static class onewayRuntimeFail extends org.apache.thrift.ProcessFunction { -+ public onewayRuntimeFail() { -+ super("onewayRuntimeFail"); -+ } -+ -+ public onewayRuntimeFail_args getEmptyArgsInstance() { -+ return new onewayRuntimeFail_args(); -+ } -+ -+ protected boolean isOneway() { -+ return true; -+ } -+ -+ public org.apache.thrift.TBase getResult(I iface, onewayRuntimeFail_args args) throws org.apache.thrift.TException { -+ iface.onewayRuntimeFail(args.value); -+ return null; -+ } -+ } -+ -+ } -+ -+ public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { -+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName()); -+ public AsyncProcessor(I iface) { -+ super(iface, getProcessMap(new java.util.HashMap>())); -+ } -+ -+ protected AsyncProcessor(I iface, java.util.Map> processMap) { -+ super(iface, getProcessMap(processMap)); -+ } -+ -+ private static java.util.Map> getProcessMap(java.util.Map> processMap) { -+ processMap.put("echoPass", new echoPass()); -+ processMap.put("onewayPass", new onewayPass()); -+ processMap.put("echoFail", new echoFail()); -+ processMap.put("onewayFail", new onewayFail()); -+ processMap.put("echoRuntimeFail", new echoRuntimeFail()); -+ processMap.put("onewayRuntimeFail", new onewayRuntimeFail()); -+ return processMap; -+ } -+ -+ public static class echoPass extends org.apache.thrift.AsyncProcessFunction { -+ public echoPass() { -+ super("echoPass"); -+ } -+ -+ public echoPass_args getEmptyArgsInstance() { -+ return new echoPass_args(); -+ } -+ -+ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { -+ final org.apache.thrift.AsyncProcessFunction fcall = this; -+ return new org.apache.thrift.async.AsyncMethodCallback() { -+ public void onComplete(java.lang.String o) { -+ echoPass_result result = new echoPass_result(); -+ result.success = o; -+ try { -+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); -+ } catch (org.apache.thrift.transport.TTransportException e) { -+ _LOGGER.error("TTransportException writing to internal frame buffer", e); -+ fb.close(); -+ } catch (java.lang.Exception e) { -+ _LOGGER.error("Exception writing to internal frame buffer", e); -+ onError(e); -+ } -+ } -+ public void onError(java.lang.Exception e) { -+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; -+ org.apache.thrift.TSerializable msg; -+ echoPass_result result = new echoPass_result(); -+ if (e instanceof org.apache.thrift.transport.TTransportException) { -+ _LOGGER.error("TTransportException inside handler", e); -+ fb.close(); -+ return; -+ } else if (e instanceof org.apache.thrift.TApplicationException) { -+ _LOGGER.error("TApplicationException inside handler", e); -+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; -+ msg = (org.apache.thrift.TApplicationException)e; -+ } else { -+ _LOGGER.error("Exception inside handler", e); -+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; -+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); -+ } -+ try { -+ fcall.sendResponse(fb,msg,msgType,seqid); -+ } catch (java.lang.Exception ex) { -+ _LOGGER.error("Exception writing to internal frame buffer", ex); -+ fb.close(); -+ } -+ } -+ }; -+ } -+ -+ protected boolean isOneway() { -+ return false; -+ } -+ -+ public void start(I iface, echoPass_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ iface.echoPass(args.value,resultHandler); -+ } -+ } -+ -+ public static class onewayPass extends org.apache.thrift.AsyncProcessFunction { -+ public onewayPass() { -+ super("onewayPass"); -+ } -+ -+ public onewayPass_args getEmptyArgsInstance() { -+ return new onewayPass_args(); -+ } -+ -+ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { -+ final org.apache.thrift.AsyncProcessFunction fcall = this; -+ return new org.apache.thrift.async.AsyncMethodCallback() { -+ public void onComplete(Void o) { -+ } -+ public void onError(java.lang.Exception e) { -+ if (e instanceof org.apache.thrift.transport.TTransportException) { -+ _LOGGER.error("TTransportException inside handler", e); -+ fb.close(); -+ } else { -+ _LOGGER.error("Exception inside oneway handler", e); -+ } -+ } -+ }; -+ } -+ -+ protected boolean isOneway() { -+ return true; -+ } -+ -+ public void start(I iface, onewayPass_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ iface.onewayPass(args.value,resultHandler); -+ } -+ } -+ -+ public static class echoFail extends org.apache.thrift.AsyncProcessFunction { -+ public echoFail() { -+ super("echoFail"); -+ } -+ -+ public echoFail_args getEmptyArgsInstance() { -+ return new echoFail_args(); -+ } -+ -+ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { -+ final org.apache.thrift.AsyncProcessFunction fcall = this; -+ return new org.apache.thrift.async.AsyncMethodCallback() { -+ public void onComplete(java.lang.String o) { -+ echoFail_result result = new echoFail_result(); -+ result.success = o; -+ try { -+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); -+ } catch (org.apache.thrift.transport.TTransportException e) { -+ _LOGGER.error("TTransportException writing to internal frame buffer", e); -+ fb.close(); -+ } catch (java.lang.Exception e) { -+ _LOGGER.error("Exception writing to internal frame buffer", e); -+ onError(e); -+ } -+ } -+ public void onError(java.lang.Exception e) { -+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; -+ org.apache.thrift.TSerializable msg; -+ echoFail_result result = new echoFail_result(); -+ if (e instanceof org.apache.thrift.transport.TTransportException) { -+ _LOGGER.error("TTransportException inside handler", e); -+ fb.close(); -+ return; -+ } else if (e instanceof org.apache.thrift.TApplicationException) { -+ _LOGGER.error("TApplicationException inside handler", e); -+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; -+ msg = (org.apache.thrift.TApplicationException)e; -+ } else { -+ _LOGGER.error("Exception inside handler", e); -+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; -+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); -+ } -+ try { -+ fcall.sendResponse(fb,msg,msgType,seqid); -+ } catch (java.lang.Exception ex) { -+ _LOGGER.error("Exception writing to internal frame buffer", ex); -+ fb.close(); -+ } -+ } -+ }; -+ } -+ -+ protected boolean isOneway() { -+ return false; -+ } -+ -+ public void start(I iface, echoFail_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ iface.echoFail(args.value,resultHandler); -+ } -+ } -+ -+ public static class onewayFail extends org.apache.thrift.AsyncProcessFunction { -+ public onewayFail() { -+ super("onewayFail"); -+ } -+ -+ public onewayFail_args getEmptyArgsInstance() { -+ return new onewayFail_args(); -+ } -+ -+ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { -+ final org.apache.thrift.AsyncProcessFunction fcall = this; -+ return new org.apache.thrift.async.AsyncMethodCallback() { -+ public void onComplete(Void o) { -+ } -+ public void onError(java.lang.Exception e) { -+ if (e instanceof org.apache.thrift.transport.TTransportException) { -+ _LOGGER.error("TTransportException inside handler", e); -+ fb.close(); -+ } else { -+ _LOGGER.error("Exception inside oneway handler", e); -+ } -+ } -+ }; -+ } -+ -+ protected boolean isOneway() { -+ return true; -+ } -+ -+ public void start(I iface, onewayFail_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ iface.onewayFail(args.value,resultHandler); -+ } -+ } -+ -+ public static class echoRuntimeFail extends org.apache.thrift.AsyncProcessFunction { -+ public echoRuntimeFail() { -+ super("echoRuntimeFail"); -+ } -+ -+ public echoRuntimeFail_args getEmptyArgsInstance() { -+ return new echoRuntimeFail_args(); -+ } -+ -+ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { -+ final org.apache.thrift.AsyncProcessFunction fcall = this; -+ return new org.apache.thrift.async.AsyncMethodCallback() { -+ public void onComplete(java.lang.String o) { -+ echoRuntimeFail_result result = new echoRuntimeFail_result(); -+ result.success = o; -+ try { -+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); -+ } catch (org.apache.thrift.transport.TTransportException e) { -+ _LOGGER.error("TTransportException writing to internal frame buffer", e); -+ fb.close(); -+ } catch (java.lang.Exception e) { -+ _LOGGER.error("Exception writing to internal frame buffer", e); -+ onError(e); -+ } -+ } -+ public void onError(java.lang.Exception e) { -+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; -+ org.apache.thrift.TSerializable msg; -+ echoRuntimeFail_result result = new echoRuntimeFail_result(); -+ if (e instanceof org.apache.thrift.transport.TTransportException) { -+ _LOGGER.error("TTransportException inside handler", e); -+ fb.close(); -+ return; -+ } else if (e instanceof org.apache.thrift.TApplicationException) { -+ _LOGGER.error("TApplicationException inside handler", e); -+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; -+ msg = (org.apache.thrift.TApplicationException)e; -+ } else { -+ _LOGGER.error("Exception inside handler", e); -+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; -+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); -+ } -+ try { -+ fcall.sendResponse(fb,msg,msgType,seqid); -+ } catch (java.lang.Exception ex) { -+ _LOGGER.error("Exception writing to internal frame buffer", ex); -+ fb.close(); -+ } -+ } -+ }; -+ } -+ -+ protected boolean isOneway() { -+ return false; -+ } -+ -+ public void start(I iface, echoRuntimeFail_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ iface.echoRuntimeFail(args.value,resultHandler); -+ } -+ } -+ -+ public static class onewayRuntimeFail extends org.apache.thrift.AsyncProcessFunction { -+ public onewayRuntimeFail() { -+ super("onewayRuntimeFail"); -+ } -+ -+ public onewayRuntimeFail_args getEmptyArgsInstance() { -+ return new onewayRuntimeFail_args(); -+ } -+ -+ public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { -+ final org.apache.thrift.AsyncProcessFunction fcall = this; -+ return new org.apache.thrift.async.AsyncMethodCallback() { -+ public void onComplete(Void o) { -+ } -+ public void onError(java.lang.Exception e) { -+ if (e instanceof org.apache.thrift.transport.TTransportException) { -+ _LOGGER.error("TTransportException inside handler", e); -+ fb.close(); -+ } else { -+ _LOGGER.error("Exception inside oneway handler", e); -+ } -+ } -+ }; -+ } -+ -+ protected boolean isOneway() { -+ return true; -+ } -+ -+ public void start(I iface, onewayRuntimeFail_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { -+ iface.onewayRuntimeFail(args.value,resultHandler); -+ } -+ } -+ -+ } -+ -+ public static class echoPass_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoPass_args"); -+ -+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoPass_argsStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoPass_argsTupleSchemeFactory(); -+ -+ public java.lang.String value; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ VALUE((short)1, "value"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 1: // VALUE -+ return VALUE; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoPass_args.class, metaDataMap); -+ } -+ -+ public echoPass_args() { -+ } -+ -+ public echoPass_args( -+ java.lang.String value) -+ { -+ this(); -+ this.value = value; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public echoPass_args(echoPass_args other) { -+ if (other.isSetValue()) { -+ this.value = other.value; -+ } -+ } -+ -+ public echoPass_args deepCopy() { -+ return new echoPass_args(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.value = null; -+ } -+ -+ public java.lang.String getValue() { -+ return this.value; -+ } -+ -+ public echoPass_args setValue(java.lang.String value) { -+ this.value = value; -+ return this; -+ } -+ -+ public void unsetValue() { -+ this.value = null; -+ } -+ -+ /** Returns true if field value is set (has been assigned a value) and false otherwise */ -+ public boolean isSetValue() { -+ return this.value != null; -+ } -+ -+ public void setValueIsSet(boolean value) { -+ if (!value) { -+ this.value = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case VALUE: -+ if (value == null) { -+ unsetValue(); -+ } else { -+ setValue((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case VALUE: -+ return getValue(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case VALUE: -+ return isSetValue(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof echoPass_args) -+ return this.equals((echoPass_args)that); -+ return false; -+ } -+ -+ public boolean equals(echoPass_args that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_value = true && this.isSetValue(); -+ boolean that_present_value = true && that.isSetValue(); -+ if (this_present_value || that_present_value) { -+ if (!(this_present_value && that_present_value)) -+ return false; -+ if (!this.value.equals(that.value)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); -+ if (isSetValue()) -+ hashCode = hashCode * 8191 + value.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(echoPass_args other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetValue()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoPass_args("); -+ boolean first = true; -+ -+ sb.append("value:"); -+ if (this.value == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.value); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class echoPass_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoPass_argsStandardScheme getScheme() { -+ return new echoPass_argsStandardScheme(); -+ } -+ } -+ -+ private static class echoPass_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, echoPass_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 1: // VALUE -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, echoPass_args struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.value != null) { -+ oprot.writeFieldBegin(VALUE_FIELD_DESC); -+ oprot.writeString(struct.value); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class echoPass_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoPass_argsTupleScheme getScheme() { -+ return new echoPass_argsTupleScheme(); -+ } -+ } -+ -+ private static class echoPass_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, echoPass_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetValue()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetValue()) { -+ oprot.writeString(struct.value); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, echoPass_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ public static class echoPass_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoPass_result"); -+ -+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoPass_resultStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoPass_resultTupleSchemeFactory(); -+ -+ public java.lang.String success; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ SUCCESS((short)0, "success"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 0: // SUCCESS -+ return SUCCESS; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoPass_result.class, metaDataMap); -+ } -+ -+ public echoPass_result() { -+ } -+ -+ public echoPass_result( -+ java.lang.String success) -+ { -+ this(); -+ this.success = success; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public echoPass_result(echoPass_result other) { -+ if (other.isSetSuccess()) { -+ this.success = other.success; -+ } -+ } -+ -+ public echoPass_result deepCopy() { -+ return new echoPass_result(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.success = null; -+ } -+ -+ public java.lang.String getSuccess() { -+ return this.success; -+ } -+ -+ public echoPass_result setSuccess(java.lang.String success) { -+ this.success = success; -+ return this; -+ } -+ -+ public void unsetSuccess() { -+ this.success = null; -+ } -+ -+ /** Returns true if field success is set (has been assigned a value) and false otherwise */ -+ public boolean isSetSuccess() { -+ return this.success != null; -+ } -+ -+ public void setSuccessIsSet(boolean value) { -+ if (!value) { -+ this.success = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case SUCCESS: -+ if (value == null) { -+ unsetSuccess(); -+ } else { -+ setSuccess((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case SUCCESS: -+ return getSuccess(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case SUCCESS: -+ return isSetSuccess(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof echoPass_result) -+ return this.equals((echoPass_result)that); -+ return false; -+ } -+ -+ public boolean equals(echoPass_result that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_success = true && this.isSetSuccess(); -+ boolean that_present_success = true && that.isSetSuccess(); -+ if (this_present_success || that_present_success) { -+ if (!(this_present_success && that_present_success)) -+ return false; -+ if (!this.success.equals(that.success)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); -+ if (isSetSuccess()) -+ hashCode = hashCode * 8191 + success.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(echoPass_result other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetSuccess()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoPass_result("); -+ boolean first = true; -+ -+ sb.append("success:"); -+ if (this.success == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.success); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class echoPass_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoPass_resultStandardScheme getScheme() { -+ return new echoPass_resultStandardScheme(); -+ } -+ } -+ -+ private static class echoPass_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, echoPass_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 0: // SUCCESS -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.success = iprot.readString(); -+ struct.setSuccessIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, echoPass_result struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.success != null) { -+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); -+ oprot.writeString(struct.success); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class echoPass_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoPass_resultTupleScheme getScheme() { -+ return new echoPass_resultTupleScheme(); -+ } -+ } -+ -+ private static class echoPass_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, echoPass_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetSuccess()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetSuccess()) { -+ oprot.writeString(struct.success); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, echoPass_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.success = iprot.readString(); -+ struct.setSuccessIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ public static class onewayPass_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayPass_args"); -+ -+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayPass_argsStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayPass_argsTupleSchemeFactory(); -+ -+ public java.lang.String value; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ VALUE((short)1, "value"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 1: // VALUE -+ return VALUE; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayPass_args.class, metaDataMap); -+ } -+ -+ public onewayPass_args() { -+ } -+ -+ public onewayPass_args( -+ java.lang.String value) -+ { -+ this(); -+ this.value = value; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public onewayPass_args(onewayPass_args other) { -+ if (other.isSetValue()) { -+ this.value = other.value; -+ } -+ } -+ -+ public onewayPass_args deepCopy() { -+ return new onewayPass_args(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.value = null; -+ } -+ -+ public java.lang.String getValue() { -+ return this.value; -+ } -+ -+ public onewayPass_args setValue(java.lang.String value) { -+ this.value = value; -+ return this; -+ } -+ -+ public void unsetValue() { -+ this.value = null; -+ } -+ -+ /** Returns true if field value is set (has been assigned a value) and false otherwise */ -+ public boolean isSetValue() { -+ return this.value != null; -+ } -+ -+ public void setValueIsSet(boolean value) { -+ if (!value) { -+ this.value = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case VALUE: -+ if (value == null) { -+ unsetValue(); -+ } else { -+ setValue((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case VALUE: -+ return getValue(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case VALUE: -+ return isSetValue(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof onewayPass_args) -+ return this.equals((onewayPass_args)that); -+ return false; -+ } -+ -+ public boolean equals(onewayPass_args that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_value = true && this.isSetValue(); -+ boolean that_present_value = true && that.isSetValue(); -+ if (this_present_value || that_present_value) { -+ if (!(this_present_value && that_present_value)) -+ return false; -+ if (!this.value.equals(that.value)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); -+ if (isSetValue()) -+ hashCode = hashCode * 8191 + value.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(onewayPass_args other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetValue()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("onewayPass_args("); -+ boolean first = true; -+ -+ sb.append("value:"); -+ if (this.value == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.value); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class onewayPass_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public onewayPass_argsStandardScheme getScheme() { -+ return new onewayPass_argsStandardScheme(); -+ } -+ } -+ -+ private static class onewayPass_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, onewayPass_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 1: // VALUE -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, onewayPass_args struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.value != null) { -+ oprot.writeFieldBegin(VALUE_FIELD_DESC); -+ oprot.writeString(struct.value); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class onewayPass_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public onewayPass_argsTupleScheme getScheme() { -+ return new onewayPass_argsTupleScheme(); -+ } -+ } -+ -+ private static class onewayPass_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, onewayPass_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetValue()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetValue()) { -+ oprot.writeString(struct.value); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, onewayPass_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ public static class echoFail_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoFail_args"); -+ -+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoFail_argsStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoFail_argsTupleSchemeFactory(); -+ -+ public java.lang.String value; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ VALUE((short)1, "value"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 1: // VALUE -+ return VALUE; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoFail_args.class, metaDataMap); -+ } -+ -+ public echoFail_args() { -+ } -+ -+ public echoFail_args( -+ java.lang.String value) -+ { -+ this(); -+ this.value = value; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public echoFail_args(echoFail_args other) { -+ if (other.isSetValue()) { -+ this.value = other.value; -+ } -+ } -+ -+ public echoFail_args deepCopy() { -+ return new echoFail_args(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.value = null; -+ } -+ -+ public java.lang.String getValue() { -+ return this.value; -+ } -+ -+ public echoFail_args setValue(java.lang.String value) { -+ this.value = value; -+ return this; -+ } -+ -+ public void unsetValue() { -+ this.value = null; -+ } -+ -+ /** Returns true if field value is set (has been assigned a value) and false otherwise */ -+ public boolean isSetValue() { -+ return this.value != null; -+ } -+ -+ public void setValueIsSet(boolean value) { -+ if (!value) { -+ this.value = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case VALUE: -+ if (value == null) { -+ unsetValue(); -+ } else { -+ setValue((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case VALUE: -+ return getValue(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case VALUE: -+ return isSetValue(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof echoFail_args) -+ return this.equals((echoFail_args)that); -+ return false; -+ } -+ -+ public boolean equals(echoFail_args that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_value = true && this.isSetValue(); -+ boolean that_present_value = true && that.isSetValue(); -+ if (this_present_value || that_present_value) { -+ if (!(this_present_value && that_present_value)) -+ return false; -+ if (!this.value.equals(that.value)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); -+ if (isSetValue()) -+ hashCode = hashCode * 8191 + value.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(echoFail_args other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetValue()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoFail_args("); -+ boolean first = true; -+ -+ sb.append("value:"); -+ if (this.value == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.value); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class echoFail_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoFail_argsStandardScheme getScheme() { -+ return new echoFail_argsStandardScheme(); -+ } -+ } -+ -+ private static class echoFail_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, echoFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 1: // VALUE -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, echoFail_args struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.value != null) { -+ oprot.writeFieldBegin(VALUE_FIELD_DESC); -+ oprot.writeString(struct.value); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class echoFail_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoFail_argsTupleScheme getScheme() { -+ return new echoFail_argsTupleScheme(); -+ } -+ } -+ -+ private static class echoFail_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, echoFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetValue()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetValue()) { -+ oprot.writeString(struct.value); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, echoFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ public static class echoFail_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoFail_result"); -+ -+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoFail_resultStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoFail_resultTupleSchemeFactory(); -+ -+ public java.lang.String success; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ SUCCESS((short)0, "success"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 0: // SUCCESS -+ return SUCCESS; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoFail_result.class, metaDataMap); -+ } -+ -+ public echoFail_result() { -+ } -+ -+ public echoFail_result( -+ java.lang.String success) -+ { -+ this(); -+ this.success = success; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public echoFail_result(echoFail_result other) { -+ if (other.isSetSuccess()) { -+ this.success = other.success; -+ } -+ } -+ -+ public echoFail_result deepCopy() { -+ return new echoFail_result(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.success = null; -+ } -+ -+ public java.lang.String getSuccess() { -+ return this.success; -+ } -+ -+ public echoFail_result setSuccess(java.lang.String success) { -+ this.success = success; -+ return this; -+ } -+ -+ public void unsetSuccess() { -+ this.success = null; -+ } -+ -+ /** Returns true if field success is set (has been assigned a value) and false otherwise */ -+ public boolean isSetSuccess() { -+ return this.success != null; -+ } -+ -+ public void setSuccessIsSet(boolean value) { -+ if (!value) { -+ this.success = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case SUCCESS: -+ if (value == null) { -+ unsetSuccess(); -+ } else { -+ setSuccess((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case SUCCESS: -+ return getSuccess(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case SUCCESS: -+ return isSetSuccess(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof echoFail_result) -+ return this.equals((echoFail_result)that); -+ return false; -+ } -+ -+ public boolean equals(echoFail_result that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_success = true && this.isSetSuccess(); -+ boolean that_present_success = true && that.isSetSuccess(); -+ if (this_present_success || that_present_success) { -+ if (!(this_present_success && that_present_success)) -+ return false; -+ if (!this.success.equals(that.success)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); -+ if (isSetSuccess()) -+ hashCode = hashCode * 8191 + success.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(echoFail_result other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetSuccess()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoFail_result("); -+ boolean first = true; -+ -+ sb.append("success:"); -+ if (this.success == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.success); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class echoFail_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoFail_resultStandardScheme getScheme() { -+ return new echoFail_resultStandardScheme(); -+ } -+ } -+ -+ private static class echoFail_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, echoFail_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 0: // SUCCESS -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.success = iprot.readString(); -+ struct.setSuccessIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, echoFail_result struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.success != null) { -+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); -+ oprot.writeString(struct.success); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class echoFail_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoFail_resultTupleScheme getScheme() { -+ return new echoFail_resultTupleScheme(); -+ } -+ } -+ -+ private static class echoFail_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, echoFail_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetSuccess()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetSuccess()) { -+ oprot.writeString(struct.success); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, echoFail_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.success = iprot.readString(); -+ struct.setSuccessIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ public static class onewayFail_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayFail_args"); -+ -+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayFail_argsStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayFail_argsTupleSchemeFactory(); -+ -+ public java.lang.String value; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ VALUE((short)1, "value"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 1: // VALUE -+ return VALUE; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayFail_args.class, metaDataMap); -+ } -+ -+ public onewayFail_args() { -+ } -+ -+ public onewayFail_args( -+ java.lang.String value) -+ { -+ this(); -+ this.value = value; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public onewayFail_args(onewayFail_args other) { -+ if (other.isSetValue()) { -+ this.value = other.value; -+ } -+ } -+ -+ public onewayFail_args deepCopy() { -+ return new onewayFail_args(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.value = null; -+ } -+ -+ public java.lang.String getValue() { -+ return this.value; -+ } -+ -+ public onewayFail_args setValue(java.lang.String value) { -+ this.value = value; -+ return this; -+ } -+ -+ public void unsetValue() { -+ this.value = null; -+ } -+ -+ /** Returns true if field value is set (has been assigned a value) and false otherwise */ -+ public boolean isSetValue() { -+ return this.value != null; -+ } -+ -+ public void setValueIsSet(boolean value) { -+ if (!value) { -+ this.value = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case VALUE: -+ if (value == null) { -+ unsetValue(); -+ } else { -+ setValue((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case VALUE: -+ return getValue(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case VALUE: -+ return isSetValue(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof onewayFail_args) -+ return this.equals((onewayFail_args)that); -+ return false; -+ } -+ -+ public boolean equals(onewayFail_args that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_value = true && this.isSetValue(); -+ boolean that_present_value = true && that.isSetValue(); -+ if (this_present_value || that_present_value) { -+ if (!(this_present_value && that_present_value)) -+ return false; -+ if (!this.value.equals(that.value)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); -+ if (isSetValue()) -+ hashCode = hashCode * 8191 + value.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(onewayFail_args other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetValue()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("onewayFail_args("); -+ boolean first = true; -+ -+ sb.append("value:"); -+ if (this.value == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.value); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class onewayFail_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public onewayFail_argsStandardScheme getScheme() { -+ return new onewayFail_argsStandardScheme(); -+ } -+ } -+ -+ private static class onewayFail_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, onewayFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 1: // VALUE -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, onewayFail_args struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.value != null) { -+ oprot.writeFieldBegin(VALUE_FIELD_DESC); -+ oprot.writeString(struct.value); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class onewayFail_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public onewayFail_argsTupleScheme getScheme() { -+ return new onewayFail_argsTupleScheme(); -+ } -+ } -+ -+ private static class onewayFail_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, onewayFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetValue()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetValue()) { -+ oprot.writeString(struct.value); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, onewayFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ public static class echoRuntimeFail_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoRuntimeFail_args"); -+ -+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoRuntimeFail_argsStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoRuntimeFail_argsTupleSchemeFactory(); -+ -+ public java.lang.String value; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ VALUE((short)1, "value"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 1: // VALUE -+ return VALUE; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoRuntimeFail_args.class, metaDataMap); -+ } -+ -+ public echoRuntimeFail_args() { -+ } -+ -+ public echoRuntimeFail_args( -+ java.lang.String value) -+ { -+ this(); -+ this.value = value; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public echoRuntimeFail_args(echoRuntimeFail_args other) { -+ if (other.isSetValue()) { -+ this.value = other.value; -+ } -+ } -+ -+ public echoRuntimeFail_args deepCopy() { -+ return new echoRuntimeFail_args(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.value = null; -+ } -+ -+ public java.lang.String getValue() { -+ return this.value; -+ } -+ -+ public echoRuntimeFail_args setValue(java.lang.String value) { -+ this.value = value; -+ return this; -+ } -+ -+ public void unsetValue() { -+ this.value = null; -+ } -+ -+ /** Returns true if field value is set (has been assigned a value) and false otherwise */ -+ public boolean isSetValue() { -+ return this.value != null; -+ } -+ -+ public void setValueIsSet(boolean value) { -+ if (!value) { -+ this.value = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case VALUE: -+ if (value == null) { -+ unsetValue(); -+ } else { -+ setValue((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case VALUE: -+ return getValue(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case VALUE: -+ return isSetValue(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof echoRuntimeFail_args) -+ return this.equals((echoRuntimeFail_args)that); -+ return false; -+ } -+ -+ public boolean equals(echoRuntimeFail_args that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_value = true && this.isSetValue(); -+ boolean that_present_value = true && that.isSetValue(); -+ if (this_present_value || that_present_value) { -+ if (!(this_present_value && that_present_value)) -+ return false; -+ if (!this.value.equals(that.value)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); -+ if (isSetValue()) -+ hashCode = hashCode * 8191 + value.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(echoRuntimeFail_args other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetValue()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoRuntimeFail_args("); -+ boolean first = true; -+ -+ sb.append("value:"); -+ if (this.value == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.value); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class echoRuntimeFail_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoRuntimeFail_argsStandardScheme getScheme() { -+ return new echoRuntimeFail_argsStandardScheme(); -+ } -+ } -+ -+ private static class echoRuntimeFail_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, echoRuntimeFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 1: // VALUE -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, echoRuntimeFail_args struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.value != null) { -+ oprot.writeFieldBegin(VALUE_FIELD_DESC); -+ oprot.writeString(struct.value); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class echoRuntimeFail_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoRuntimeFail_argsTupleScheme getScheme() { -+ return new echoRuntimeFail_argsTupleScheme(); -+ } -+ } -+ -+ private static class echoRuntimeFail_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, echoRuntimeFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetValue()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetValue()) { -+ oprot.writeString(struct.value); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, echoRuntimeFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ public static class echoRuntimeFail_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("echoRuntimeFail_result"); -+ -+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoRuntimeFail_resultStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoRuntimeFail_resultTupleSchemeFactory(); -+ -+ public java.lang.String success; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ SUCCESS((short)0, "success"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 0: // SUCCESS -+ return SUCCESS; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(echoRuntimeFail_result.class, metaDataMap); -+ } -+ -+ public echoRuntimeFail_result() { -+ } -+ -+ public echoRuntimeFail_result( -+ java.lang.String success) -+ { -+ this(); -+ this.success = success; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public echoRuntimeFail_result(echoRuntimeFail_result other) { -+ if (other.isSetSuccess()) { -+ this.success = other.success; -+ } -+ } -+ -+ public echoRuntimeFail_result deepCopy() { -+ return new echoRuntimeFail_result(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.success = null; -+ } -+ -+ public java.lang.String getSuccess() { -+ return this.success; -+ } -+ -+ public echoRuntimeFail_result setSuccess(java.lang.String success) { -+ this.success = success; -+ return this; -+ } -+ -+ public void unsetSuccess() { -+ this.success = null; -+ } -+ -+ /** Returns true if field success is set (has been assigned a value) and false otherwise */ -+ public boolean isSetSuccess() { -+ return this.success != null; -+ } -+ -+ public void setSuccessIsSet(boolean value) { -+ if (!value) { -+ this.success = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case SUCCESS: -+ if (value == null) { -+ unsetSuccess(); -+ } else { -+ setSuccess((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case SUCCESS: -+ return getSuccess(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case SUCCESS: -+ return isSetSuccess(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof echoRuntimeFail_result) -+ return this.equals((echoRuntimeFail_result)that); -+ return false; -+ } -+ -+ public boolean equals(echoRuntimeFail_result that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_success = true && this.isSetSuccess(); -+ boolean that_present_success = true && that.isSetSuccess(); -+ if (this_present_success || that_present_success) { -+ if (!(this_present_success && that_present_success)) -+ return false; -+ if (!this.success.equals(that.success)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); -+ if (isSetSuccess()) -+ hashCode = hashCode * 8191 + success.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(echoRuntimeFail_result other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetSuccess()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("echoRuntimeFail_result("); -+ boolean first = true; -+ -+ sb.append("success:"); -+ if (this.success == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.success); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class echoRuntimeFail_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoRuntimeFail_resultStandardScheme getScheme() { -+ return new echoRuntimeFail_resultStandardScheme(); -+ } -+ } -+ -+ private static class echoRuntimeFail_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, echoRuntimeFail_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 0: // SUCCESS -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.success = iprot.readString(); -+ struct.setSuccessIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, echoRuntimeFail_result struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.success != null) { -+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC); -+ oprot.writeString(struct.success); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class echoRuntimeFail_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public echoRuntimeFail_resultTupleScheme getScheme() { -+ return new echoRuntimeFail_resultTupleScheme(); -+ } -+ } -+ -+ private static class echoRuntimeFail_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, echoRuntimeFail_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetSuccess()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetSuccess()) { -+ oprot.writeString(struct.success); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, echoRuntimeFail_result struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.success = iprot.readString(); -+ struct.setSuccessIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ public static class onewayRuntimeFail_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { -+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("onewayRuntimeFail_args"); -+ -+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); -+ -+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayRuntimeFail_argsStandardSchemeFactory(); -+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayRuntimeFail_argsTupleSchemeFactory(); -+ -+ public java.lang.String value; // required -+ -+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ -+ public enum _Fields implements org.apache.thrift.TFieldIdEnum { -+ VALUE((short)1, "value"); -+ -+ private static final java.util.Map byName = new java.util.HashMap(); -+ -+ static { -+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { -+ byName.put(field.getFieldName(), field); -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, or null if its not found. -+ */ -+ public static _Fields findByThriftId(int fieldId) { -+ switch(fieldId) { -+ case 1: // VALUE -+ return VALUE; -+ default: -+ return null; -+ } -+ } -+ -+ /** -+ * Find the _Fields constant that matches fieldId, throwing an exception -+ * if it is not found. -+ */ -+ public static _Fields findByThriftIdOrThrow(int fieldId) { -+ _Fields fields = findByThriftId(fieldId); -+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); -+ return fields; -+ } -+ -+ /** -+ * Find the _Fields constant that matches name, or null if its not found. -+ */ -+ public static _Fields findByName(java.lang.String name) { -+ return byName.get(name); -+ } -+ -+ private final short _thriftId; -+ private final java.lang.String _fieldName; -+ -+ _Fields(short thriftId, java.lang.String fieldName) { -+ _thriftId = thriftId; -+ _fieldName = fieldName; -+ } -+ -+ public short getThriftFieldId() { -+ return _thriftId; -+ } -+ -+ public java.lang.String getFieldName() { -+ return _fieldName; -+ } -+ } -+ -+ // isset id assignments -+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; -+ static { -+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); -+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, -+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); -+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); -+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(onewayRuntimeFail_args.class, metaDataMap); -+ } -+ -+ public onewayRuntimeFail_args() { -+ } -+ -+ public onewayRuntimeFail_args( -+ java.lang.String value) -+ { -+ this(); -+ this.value = value; -+ } -+ -+ /** -+ * Performs a deep copy on other. -+ */ -+ public onewayRuntimeFail_args(onewayRuntimeFail_args other) { -+ if (other.isSetValue()) { -+ this.value = other.value; -+ } -+ } -+ -+ public onewayRuntimeFail_args deepCopy() { -+ return new onewayRuntimeFail_args(this); -+ } -+ -+ @Override -+ public void clear() { -+ this.value = null; -+ } -+ -+ public java.lang.String getValue() { -+ return this.value; -+ } -+ -+ public onewayRuntimeFail_args setValue(java.lang.String value) { -+ this.value = value; -+ return this; -+ } -+ -+ public void unsetValue() { -+ this.value = null; -+ } -+ -+ /** Returns true if field value is set (has been assigned a value) and false otherwise */ -+ public boolean isSetValue() { -+ return this.value != null; -+ } -+ -+ public void setValueIsSet(boolean value) { -+ if (!value) { -+ this.value = null; -+ } -+ } -+ -+ public void setFieldValue(_Fields field, java.lang.Object value) { -+ switch (field) { -+ case VALUE: -+ if (value == null) { -+ unsetValue(); -+ } else { -+ setValue((java.lang.String)value); -+ } -+ break; -+ -+ } -+ } -+ -+ public java.lang.Object getFieldValue(_Fields field) { -+ switch (field) { -+ case VALUE: -+ return getValue(); -+ -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ -+ public boolean isSet(_Fields field) { -+ if (field == null) { -+ throw new java.lang.IllegalArgumentException(); -+ } -+ -+ switch (field) { -+ case VALUE: -+ return isSetValue(); -+ } -+ throw new java.lang.IllegalStateException(); -+ } -+ -+ @Override -+ public boolean equals(java.lang.Object that) { -+ if (that == null) -+ return false; -+ if (that instanceof onewayRuntimeFail_args) -+ return this.equals((onewayRuntimeFail_args)that); -+ return false; -+ } -+ -+ public boolean equals(onewayRuntimeFail_args that) { -+ if (that == null) -+ return false; -+ if (this == that) -+ return true; -+ -+ boolean this_present_value = true && this.isSetValue(); -+ boolean that_present_value = true && that.isSetValue(); -+ if (this_present_value || that_present_value) { -+ if (!(this_present_value && that_present_value)) -+ return false; -+ if (!this.value.equals(that.value)) -+ return false; -+ } -+ -+ return true; -+ } -+ -+ @Override -+ public int hashCode() { -+ int hashCode = 1; -+ -+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287); -+ if (isSetValue()) -+ hashCode = hashCode * 8191 + value.hashCode(); -+ -+ return hashCode; -+ } -+ -+ @Override -+ public int compareTo(onewayRuntimeFail_args other) { -+ if (!getClass().equals(other.getClass())) { -+ return getClass().getName().compareTo(other.getClass().getName()); -+ } -+ -+ int lastComparison = 0; -+ -+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ if (isSetValue()) { -+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); -+ if (lastComparison != 0) { -+ return lastComparison; -+ } -+ } -+ return 0; -+ } -+ -+ public _Fields fieldForId(int fieldId) { -+ return _Fields.findByThriftId(fieldId); -+ } -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { -+ scheme(iprot).read(iprot, this); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { -+ scheme(oprot).write(oprot, this); -+ } -+ -+ @Override -+ public java.lang.String toString() { -+ java.lang.StringBuilder sb = new java.lang.StringBuilder("onewayRuntimeFail_args("); -+ boolean first = true; -+ -+ sb.append("value:"); -+ if (this.value == null) { -+ sb.append("null"); -+ } else { -+ sb.append(this.value); -+ } -+ first = false; -+ sb.append(")"); -+ return sb.toString(); -+ } -+ -+ public void validate() throws org.apache.thrift.TException { -+ // check for required fields -+ // check for sub-struct validity -+ } -+ -+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { -+ try { -+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { -+ try { -+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); -+ } catch (org.apache.thrift.TException te) { -+ throw new java.io.IOException(te); -+ } -+ } -+ -+ private static class onewayRuntimeFail_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public onewayRuntimeFail_argsStandardScheme getScheme() { -+ return new onewayRuntimeFail_argsStandardScheme(); -+ } -+ } -+ -+ private static class onewayRuntimeFail_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { -+ -+ public void read(org.apache.thrift.protocol.TProtocol iprot, onewayRuntimeFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TField schemeField; -+ iprot.readStructBegin(); -+ while (true) -+ { -+ schemeField = iprot.readFieldBegin(); -+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { -+ break; -+ } -+ switch (schemeField.id) { -+ case 1: // VALUE -+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } else { -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ break; -+ default: -+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); -+ } -+ iprot.readFieldEnd(); -+ } -+ iprot.readStructEnd(); -+ -+ // check for required fields of primitive type, which can't be checked in the validate method -+ struct.validate(); -+ } -+ -+ public void write(org.apache.thrift.protocol.TProtocol oprot, onewayRuntimeFail_args struct) throws org.apache.thrift.TException { -+ struct.validate(); -+ -+ oprot.writeStructBegin(STRUCT_DESC); -+ if (struct.value != null) { -+ oprot.writeFieldBegin(VALUE_FIELD_DESC); -+ oprot.writeString(struct.value); -+ oprot.writeFieldEnd(); -+ } -+ oprot.writeFieldStop(); -+ oprot.writeStructEnd(); -+ } -+ -+ } -+ -+ private static class onewayRuntimeFail_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { -+ public onewayRuntimeFail_argsTupleScheme getScheme() { -+ return new onewayRuntimeFail_argsTupleScheme(); -+ } -+ } -+ -+ private static class onewayRuntimeFail_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { -+ -+ @Override -+ public void write(org.apache.thrift.protocol.TProtocol prot, onewayRuntimeFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet optionals = new java.util.BitSet(); -+ if (struct.isSetValue()) { -+ optionals.set(0); -+ } -+ oprot.writeBitSet(optionals, 1); -+ if (struct.isSetValue()) { -+ oprot.writeString(struct.value); -+ } -+ } -+ -+ @Override -+ public void read(org.apache.thrift.protocol.TProtocol prot, onewayRuntimeFail_args struct) throws org.apache.thrift.TException { -+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; -+ java.util.BitSet incoming = iprot.readBitSet(1); -+ if (incoming.get(0)) { -+ struct.value = iprot.readString(); -+ struct.setValueIsSet(true); -+ } -+ } -+ } -+ -+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) { -+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); -+ } -+ } -+ -+ private static void unusedMethod() {} -+} -diff --git a/test/src/main/scripts/generate-thrift.sh b/test/src/main/scripts/generate-thrift.sh -new file mode 100755 -index 0000000..061ad4f ---- /dev/null -+++ b/test/src/main/scripts/generate-thrift.sh -@@ -0,0 +1,24 @@ -+#! /usr/bin/env bash -+ -+# 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. -+ -+# This script will regenerate the thrift code for accumulo-trace. -+INCLUDED_MODULES=(-) -+BASE_OUTPUT_PACKAGE='org.apache.accumulo' -+PACKAGES_TO_GENERATE=(test.rpc) -+ -+. ../core/src/main/scripts/generate-thrift.sh -+ -diff --git a/test/src/main/thrift/test.thrift b/test/src/main/thrift/test.thrift -new file mode 100644 -index 0000000..7e4d955 ---- /dev/null -+++ b/test/src/main/thrift/test.thrift -@@ -0,0 +1,30 @@ -+/* -+* 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. -+*/ -+ -+namespace java org.apache.accumulo.test.rpc.thrift -+ -+service SimpleThriftService -+{ -+ string echoPass(1:string value) -+ oneway void onewayPass(1:string value) -+ -+ string echoFail(1:string value) -+ oneway void onewayFail(1:string value) -+ -+ string echoRuntimeFail(1:string value) -+ oneway void onewayRuntimeFail(1:string value) -+} diff --git a/accumulo-gc.service b/accumulo-gc.service deleted file mode 100644 index e9135b3..0000000 --- a/accumulo-gc.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Apache Accumulo Garbage Collector service -After=syslog.target network.target - -[Service] -User=accumulo -Group=accumulo -ExecStart=/usr/bin/accumulo gc -SuccessExitStatus=143 - -[Install] -WantedBy=multi-user.target diff --git a/accumulo-master.service b/accumulo-master.service deleted file mode 100644 index 0695f04..0000000 --- a/accumulo-master.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Apache Accumulo Master service -After=syslog.target network.target - -[Service] -User=accumulo -Group=accumulo -ExecStart=/usr/bin/accumulo master -SuccessExitStatus=143 - -[Install] -WantedBy=multi-user.target diff --git a/accumulo-monitor.service b/accumulo-monitor.service deleted file mode 100644 index a291928..0000000 --- a/accumulo-monitor.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Apache Accumulo Monitor service -After=syslog.target network.target - -[Service] -User=accumulo -Group=accumulo -ExecStart=/usr/bin/accumulo monitor -SuccessExitStatus=143 - -[Install] -WantedBy=multi-user.target diff --git a/accumulo-tracer.service b/accumulo-tracer.service deleted file mode 100644 index 8d9caad..0000000 --- a/accumulo-tracer.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Apache Accumulo Tracer service -After=syslog.target network.target - -[Service] -User=accumulo -Group=accumulo -ExecStart=/usr/bin/accumulo tracer -SuccessExitStatus=143 - -[Install] -WantedBy=multi-user.target diff --git a/accumulo-tserver.service b/accumulo-tserver.service deleted file mode 100644 index a69c5b2..0000000 --- a/accumulo-tserver.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Apache Accumulo TServer service -After=syslog.target network.target - -[Service] -User=accumulo -Group=accumulo -ExecStart=/usr/bin/accumulo tserver -SuccessExitStatus=143 - -[Install] -WantedBy=multi-user.target diff --git a/accumulo.conf b/accumulo.conf deleted file mode 100644 index 191fe35..0000000 --- a/accumulo.conf +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/bash - -# This file is sourced by /usr/bin/accumulo before launching java. It will use -# the $ACCUMULO_OPTS environment variable created here to add options to the -# java command line. This file can be overridden per-user by creating a -# $HOME/.accumulorc to be sourced after this file. - -# The $1 parameter is passed with the first argument provided to -# /usr/bin/accumulo, which is usually the name of the accumulo service or -# function to run. - -# Append some common arguments -# -# Note: app isn't used for anything, but makes it easier to locate services -# quickly with ps/top/etc output -ACCUMULO_OPTS=("-Dapp=$1" '-XX:+UseConcMarkSweepGC' '-XX:CMSInitiatingOccupancyFraction=75' '-Djava.net.preferIPv4Stack=true' '-XX:-OmitStackTraceInFastThrow' '-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl' '-XX:OnOutOfMemoryError=kill -9 %p') - -# Append some service-specific arguments -case "$1" in - gc) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx256m' '-Xms256m') ;; - master) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx1g' '-Xms1g') ;; - monitor) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx1g' '-Xms256m') ;; - tserver) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx1g' '-Xms1g' '-XX:NewSize=500m' '-XX:MaxNewSize=500m') ;; - *) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx1g' '-Xms256m') ;; -esac - -# Set this because it's read by the VFS classloader -export ACCUMULO_HOME=/etc/accumulo -# Set these because they could be referenced by logger configuration -export ACCUMULO_CONF_DIR=/etc/accumulo -export ACCUMULO_LOG_DIR=/var/log/accumulo - -# See HADOOP-7154 and ACCUMULO-847 -export MALLOC_ARENA_MAX=1 diff --git a/accumulo.spec b/accumulo.spec deleted file mode 100644 index ac66108..0000000 --- a/accumulo.spec +++ /dev/null @@ -1,687 +0,0 @@ -%global _hardened_build 1 -%global longproj Apache Accumulo - -# jpackage main class -%global main_class org.apache.%{name}.start.Main - -Name: accumulo -Version: 1.9.2 -Release: 4%{?dist} -Summary: A software platform for processing vast amounts of data -License: ASL 2.0 -URL: https://%{name}.apache.org -Source0: https://www.apache.org/dist/%{name}/%{version}/%{name}-%{version}-src.tar.gz - -# systemd service files -Source1: %{name}-master.service -Source2: %{name}-tserver.service -Source3: %{name}-gc.service -Source4: %{name}-tracer.service -Source5: %{name}-monitor.service - -# Java configuration file for Fedora -Source6: %{name}.conf - -# Backport upstream update to thrift 0.10.0 before any Fedora patches -Patch0: ACCUMULO-4551-and-4584-backport.patch - -# Apply Fedora JNI conventions -Patch3: native-code.patch -# Patch upstream-provided example configuration for Fedora -Patch5: default-conf.patch -# Fix for updating to flot 0.8 from 0.7 (adds flot.time) -Patch8: flot8.patch -# Workaround for https://github.com/jline/jline2/issues/205 -Patch9: jline-shell-workaround.patch -# Fix differences with guava version -Patch11: guava.patch -# Fix jetty 9.4 (removed SessionManager) -Patch12: fix-jetty-9.4.patch - -BuildRequires: apache-commons-cli -BuildRequires: apache-commons-codec -BuildRequires: apache-commons-collections -BuildRequires: apache-commons-configuration -BuildRequires: apache-commons-io -BuildRequires: apache-commons-lang -BuildRequires: apache-commons-logging -BuildRequires: apache-commons-math -BuildRequires: apache-commons-vfs >= 2.1-7 -BuildRequires: apache-parent -BuildRequires: auto-service -BuildRequires: beust-jcommander -BuildRequires: bouncycastle -BuildRequires: exec-maven-plugin -BuildRequires: gcc-c++ -BuildRequires: google-gson -BuildRequires: guava -BuildRequires: hadoop-client -BuildRequires: hadoop-tests -BuildRequires: jackson-core -BuildRequires: java-devel -BuildRequires: jetty-security -BuildRequires: jetty-server -BuildRequires: jetty-servlet -BuildRequires: jetty-util -BuildRequires: jline2 -BuildRequires: jpackage-utils -BuildRequires: libthrift-java >= 0.10.0 -BuildRequires: log4j12 -BuildRequires: make -BuildRequires: maven-assembly-plugin -BuildRequires: maven-local -BuildRequires: mvn(javax.servlet:javax.servlet-api) -BuildRequires: native-maven-plugin -BuildRequires: powermock-api-easymock -BuildRequires: powermock-core -BuildRequires: powermock-junit4 -BuildRequires: slf4j -BuildRequires: systemd -BuildRequires: thrift >= 0.10.0 -BuildRequires: zookeeper-java - -Requires: %{name}-core = %{version}-%{release} -Requires: %{name}-shell = %{version}-%{release} -Requires: %{name}-master = %{version}-%{release} -Requires: %{name}-tserver = %{version}-%{release} -Requires: %{name}-gc = %{version}-%{release} -Requires: %{name}-monitor = %{version}-%{release} -Requires: %{name}-tracer = %{version}-%{release} -Requires: %{name}-examples = %{version}-%{release} -Requires: %{name}-native%{?_isa} = %{version}-%{release} - -%description - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -%package core -Summary: Libraries for %{longproj} Java clients -# the bloom filter code is BSD licensed, everything else is ASL 2.0 -License: ASL 2.0 and BSD -BuildArch: noarch -Requires(pre): /usr/sbin/useradd -Requires: libthrift-java >= 0.10.0 -Requires: javapackages-tools -Obsoletes: %{name}-javadoc < 1.6.0-5%{?dist} - -%description core - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides libraries for %{longproj} clients. - -%package server-base -Summary: The %{longproj} Server Base libraries -License: ASL 2.0 -BuildArch: noarch -Requires: %{name}-core = %{version}-%{release} - -%description server-base - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides jars for other %{longproj} services. - -%package master -Summary: The %{longproj} Master service -License: ASL 2.0 -BuildArch: noarch -Requires: %{name}-core = %{version}-%{release} -Requires: %{name}-server-base = %{version}-%{release} -Requires: systemd - -%description master - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides the master service for %{longproj}. - -%package tserver -Summary: The %{longproj} TServer service -License: ASL 2.0 -BuildArch: noarch -Requires: %{name}-core = %{version}-%{release} -Requires: %{name}-server-base = %{version}-%{release} -Requires: systemd - -%description tserver - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides the tserver service for %{longproj}. - -%package gc -Summary: The %{longproj} Garbage Collector service -License: ASL 2.0 -BuildArch: noarch -Requires: %{name}-core = %{version}-%{release} -Requires: %{name}-server-base = %{version}-%{release} -Requires: systemd - -%description gc - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides the gc service for %{longproj}. - -%package monitor -Summary: The %{longproj} Monitor service -License: ASL 2.0 -BuildArch: noarch -Requires: %{name}-core = %{version}-%{release} -Requires: %{name}-server-base = %{version}-%{release} -Requires: systemd -Requires: nodejs-flot -Requires: js-jquery1 - -%description monitor - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides the monitor service for %{longproj}. - -%package tracer -Summary: The %{longproj} Tracer service -License: ASL 2.0 -BuildArch: noarch -Requires: %{name}-core = %{version}-%{release} -Requires: %{name}-server-base = %{version}-%{release} -Requires: systemd - -%description tracer - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides the tracer service for %{longproj}. - -%package examples -Summary: Examples for %{longproj} -License: ASL 2.0 -BuildArch: noarch -Requires: %{name}-core = %{version}-%{release} - -%description examples - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides examples for %{longproj}. - -%package native -Summary: Native libraries for %{longproj} -License: ASL 2.0 -Requires: %{name}-tserver = %{version}-%{release} - -%description native - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides native code for %{longproj}'s TServer. - -%package shell -Summary: Shell for %{longproj} -License: ASL 2.0 -Requires: %{name}-core = %{version}-%{release} - -%description shell - %{longproj} is a sorted, distributed key/value store based on Google's -BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It -features a few novel improvements on the BigTable design in the form of -cell-level access labels and a server-side programming mechanism that can -modify key/value pairs at various points in the data management process. - -This package provides the shell client for %{longproj}. - -%prep -%autosetup -p1 - -# Remove tests which use MiniDFSCluster, because Hadoop is still using old -# Jetty versions, and the class path is hard to get correct for these -rm -rf start/src/test/java/org/apache/accumulo/start/classloader/vfs/ -rm -f core/src/test/java/org/apache/accumulo/core/conf/CredentialProviderFactoryShimTest.java - -# Remove test(s) which rely on questionable log or console capturing behavior -rm -f core/src/test/java/org/apache/accumulo/core/iterators/user/{,BigDecimal}CombinerTest.java -rm -f shell/src/test/java/org/apache/accumulo/shell/Shell{,Config}Test.java - -# Make sure thrift script from thrift 0.10.0 patch is executable -chmod +x test/src/main/scripts/generate-thrift.sh - -# Remove flot and jquery bundling from upstream tarball -rm -rf server/monitor/src/main/resources/web/flot/ - -# Update dependency versions -%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='jline']/pom:version" "2.10" -%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='zookeeper']/pom:version" "3.4.5" -%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='libthrift']/pom:version" "0.10.0" -%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='log4j']/pom:version" "1.2.17" -%pom_xpath_set "pom:project/pom:dependencyManagement/pom:dependencies/pom:dependency[pom:artifactId='bcprov-jdk15on']/pom:artifactId" "bcprov-jdk16" - -# Remove enforcer animal-sniffer rule -%pom_xpath_remove "pom:project/pom:build/pom:pluginManagement/pom:plugins/pom:plugin[pom:artifactId='maven-enforcer-plugin']/pom:dependencies" -%pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-enforcer-plugin']/pom:executions/pom:execution[pom:id='enforce-java-signatures']" - -# Disable unneeded/unused modules -%pom_disable_module test -%pom_disable_module proxy -%pom_disable_module maven-plugin -%pom_disable_module docs -%pom_disable_module assemble -# Mini isn't needed -%pom_disable_module minicluster -%pom_disable_module iterator-test-harness - -# Remove unneeded plugins -%pom_remove_plugin :maven-checkstyle-plugin -%pom_remove_plugin :maven-site-plugin -%pom_remove_plugin :maven-failsafe-plugin -%pom_remove_plugin :apache-rat-plugin -%pom_remove_plugin :sortpom-maven-plugin -%pom_remove_plugin :mavanagaiata -%pom_remove_plugin :findbugs-maven-plugin -%pom_remove_plugin :formatter-maven-plugin -%pom_remove_plugin :impsort-maven-plugin -%pom_remove_plugin :warbucks-maven-plugin -%pom_remove_plugin :modernizer-maven-plugin -%pom_remove_plugin :apilyzer-maven-plugin core - -# Disable exec plugin for start module, which builds test jars; tests require -# miniDFS, which isn't available in Fedora at this time -%pom_remove_plugin :exec-maven-plugin start - -# Mini isn't needed -#%%mvn_package ":%%{name}-minicluster" __noinstall -%mvn_package ":%{name}-{project,core,fate,trace,start}" core -%mvn_package ":%{name}-examples-simple" examples -%mvn_package ":%{name}-gc" gc -%mvn_package ":%{name}-master" master -%mvn_package ":%{name}-monitor" monitor -%mvn_package ":%{name}-server-base" server-base -%mvn_package ":%{name}-tracer" tracer -%mvn_package ":%{name}-tserver" tserver -%mvn_package ":%{name}-shell" shell - -# build native, but skip install; JNI *.so is copied manually -%mvn_package ":%{name}-native" __noinstall - -%build -# - Skipping javadocs, because it's not useful or required -# - ITs are skipped because they time out frequently and take too many -# resources to run reliably. Failures do not reliably indicate meaningful -# issues. -# - Tests are skipped because of spurious failures of surefire plugin in the -# koji builders -rm -rf start/src/test/ # start tests require miniDFS for compilation; not available in Fedora -%mvn_build -j -- -Pthrift -DskipTests -DskipITs - -%install -%mvn_install - -# create symlink for system-provided web assets to be added to classpath -install -d -m 755 %{buildroot}%{_datadir}/%{name}/lib/web -rm -f %{buildroot}%{_datadir}/%{name}/lib/web/flot -ln -s %{_usr}/lib/node_modules/flot %{buildroot}%{_datadir}/%{name}/lib/web/flot - -# native libs -install -d -m 755 %{buildroot}%{_libdir}/%{name} -install -d -m 755 %{buildroot}%{_var}/cache/%{name} -install -p -m 755 server/native/target/%{name}-native-%{version}/%{name}-native-%{version}/lib%{name}.so %{buildroot}%{_libdir}/%{name} - -# generate default config for Fedora from upstream examples -install -d -m 755 %{buildroot}%{_sysconfdir}/%{name} -install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/lib -install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/lib/ext -assemble/bin/bootstrap_config.sh -o -d %{buildroot}%{_sysconfdir}/%{name} -s 3GB -n -v 2 -for x in gc masters monitor slaves tracers %{name}-env.sh generic_logger.xml generic_logger.properties monitor_logger.xml monitor_logger.properties %{name}.policy.example; do rm -f %{buildroot}%{_sysconfdir}/%{name}/$x; done -cp %{buildroot}%{_sysconfdir}/%{name}/log4j.properties %{buildroot}%{_sysconfdir}/%{name}/generic_logger.properties -cp %{buildroot}%{_sysconfdir}/%{name}/log4j.properties %{buildroot}%{_sysconfdir}/%{name}/monitor_logger.properties - -# main launcher -%jpackage_script %{main_class} "" "" %{name}:%{name}/%{name}-tserver:jetty:servlet:avro/avro:apache-commons-io:apache-commons-cli:apache-commons-codec:apache-commons-collections:apache-commons-configuration:apache-commons-lang:apache-commons-logging:apache-commons-math:apache-commons-vfs:beust-jcommander:google-gson:guava:hadoop/hadoop-auth:hadoop/hadoop-common:hadoop/hadoop-hdfs:jansi/jansi:jline/jline:libthrift:log4j-1.2.17:slf4j/slf4j-api:slf4j/slf4j-log4j12:zookeeper/zookeeper:protobuf-java:jackson/jackson-core-asl:jackson/jackson-mapper-asl:jackson-annotations:jackson-core:jackson-databind:htrace/htrace-core %{name} true -# fixup the generated jpackage script -sed -i -e 's/^#!\/bin\/sh$/#!\/usr\/bin\/bash/' %{buildroot}%{_bindir}/%{name} -# ensure the java configuration options know which service is being called -sed -i -e 's/^\s*\.\s\s*\/etc\/java\/'%{name}'\.conf/& "\$1"/' %{buildroot}%{_bindir}/%{name} -sed -i -e 's/^\s*\.\s\s*\$HOME\/\.'%{name}'rc$/& "\$1"/' %{buildroot}%{_bindir}/%{name} -# options may have spaces in them, so replace run with an exec that properly -# parses arguments as arrays. -sed -i -e '/^run .*$/d' %{buildroot}%{_bindir}/%{name} -sed -i -e '/^set_flags .*$/d' %{buildroot}%{_bindir}/%{name} -sed -i -e '/^set_options .*$/d' %{buildroot}%{_bindir}/%{name} -cat <>%{buildroot}%{_bindir}/%{name} -CLASSPATH="%{_sysconfdir}/%{name}:%{_datadir}/%{name}/lib/:\${CLASSPATH}" -set_javacmd - -if [ -n "\${VERBOSE}" ]; then - echo "Java virtual machine used: \${JAVACMD}" - echo "classpath used: \${CLASSPATH}" - echo "main class used: \${MAIN_CLASS}" - echo "flags used: \${FLAGS[*]}" - echo "options used: \${ACCUMULO_OPTS[*]}" - echo "arguments used: \${*}" -fi - -export CLASSPATH -exec "\${JAVACMD}" "\${FLAGS[@]}" "\${ACCUMULO_OPTS[@]}" "\${MAIN_CLASS}" "\${@}" -EOF - -# scripts for services/utilities -for service in master tserver shell init admin gc tracer classpath version rfile-info login-info zookeeper create-token info jar; do - cat <"%{name}-$service" -#!/usr/bin/bash -echo "%{name}-$service script is deprecated. Use '%{name} $service' instead." 1>&2 -%{_bindir}/%{name} $service "\$@" -EOF - install -p -m 755 %{name}-$service %{buildroot}%{_bindir} -done - -# systemd services -install -d -m 755 %{buildroot}%{_unitdir} -install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}-master.service -install -p -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}-tserver.service -install -p -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}-gc.service -install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}-tracer.service -install -p -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}-monitor.service - -# java configuration file for Fedora -install -d -m 755 %{buildroot}%{_javaconfdir} -install -p -m 755 %{SOURCE6} %{buildroot}%{_javaconfdir}/%{name}.conf - -%files -%doc LICENSE -%doc README.md -%doc NOTICE - -%files core -f .mfiles-core -%dir %{_javadir}/%{name} -%dir %{_mavenpomdir}/%{name} -%dir %{_datadir}/%{name} -%dir %{_datadir}/%{name}/lib -%{_bindir}/%{name} -%{_bindir}/%{name}-shell -%{_bindir}/%{name}-classpath -%{_bindir}/%{name}-version -%{_bindir}/%{name}-rfile-info -%{_bindir}/%{name}-login-info -%{_bindir}/%{name}-zookeeper -%{_bindir}/%{name}-create-token -%{_bindir}/%{name}-info -%{_bindir}/%{name}-jar -%attr(0750, %{name}, -) %dir %{_var}/cache/%{name} -%attr(0755, %{name}, -) %dir %{_sysconfdir}/%{name} -%attr(0755, %{name}, -) %dir %{_sysconfdir}/%{name}/lib -%attr(0755, %{name}, -) %dir %{_sysconfdir}/%{name}/lib/ext -%attr(0755, %{name}, -) %config(noreplace) %{_javaconfdir}/%{name}.conf -%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-metrics.xml -%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-site.xml -%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/auditLog.xml -%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/generic_logger.properties -%attr(0644, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/log4j.properties -%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/monitor_logger.properties -%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/client.conf -%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/hadoop-metrics2-accumulo.properties - - -%files server-base -f .mfiles-server-base -%{_bindir}/%{name}-init -%{_bindir}/%{name}-admin - -%files master -f .mfiles-master -%{_bindir}/%{name}-master -%{_unitdir}/%{name}-master.service - -%files tserver -f .mfiles-tserver -%dir %{_jnidir}/%{name} -%{_bindir}/%{name}-tserver -%{_unitdir}/%{name}-tserver.service - -%files gc -f .mfiles-gc -%{_bindir}/%{name}-gc -%{_unitdir}/%{name}-gc.service - -%files monitor -f .mfiles-monitor -%dir %{_datadir}/%{name}/lib/web -%{_datadir}/%{name}/lib/web/flot -%{_unitdir}/%{name}-monitor.service - -%files tracer -f .mfiles-tracer -%{_bindir}/%{name}-tracer -%{_unitdir}/%{name}-tracer.service - -%files examples -f .mfiles-examples - -%files shell -f .mfiles-shell - -%files native -%dir %{_libdir}/%{name} -%{_libdir}/%{name}/lib%{name}.so - -%preun master -%systemd_preun %{name}-master.service - -%preun tserver -%systemd_preun %{name}-tserver.service - -%preun gc -%systemd_preun %{name}-gc.service - -%preun tracer -%systemd_preun %{name}-tracer.service - -%preun monitor -%systemd_preun %{name}-monitor.service - -%postun master -%systemd_postun_with_restart %{name}-master.service - -%postun tserver -%systemd_postun_with_restart %{name}-tserver.service - -%postun gc -%systemd_postun_with_restart %{name}-gc.service - -%postun tracer -%systemd_postun_with_restart %{name}-tracer.service - -%postun monitor -%systemd_postun_with_restart %{name}-monitor.service - -%pre core -getent group %{name} >/dev/null || /usr/sbin/groupadd -r %{name} -getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" --shell /sbin/nologin -M -r -g %{name} --home %{_var}/cache/%{name} %{name} - -%post master -%systemd_post %{name}-master.service - -%post tserver -%systemd_post %{name}-tserver.service - -%post gc -%systemd_post %{name}-gc.service - -%post tracer -%systemd_post %{name}-tracer.service - -%post monitor -%systemd_post %{name}-monitor.service - -%changelog -* Wed Jul 24 2019 Fedora Release Engineering - 1.9.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Thu Jan 31 2019 Fedora Release Engineering - 1.9.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Aug 30 2018 Severin Gehwolf - 1.9.2-2 -- Require javapackages-tools for java-functions over just - javapackages-filesystem. See RHBZ#1600426. - -* Thu Jul 19 2018 Christopher Tubbs - 1.9.2-1 -- Update to 1.9.2; fixes rhbz#1603190 - -* Thu Jul 12 2018 Fedora Release Engineering - 1.9.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Wed Jul 11 2018 Christopher Tubbs - 1.9.1-2 -- Add gcc-c++ and make BRs - -* Fri Jul 06 2018 Christopher Tubbs - 1.9.1-1 -- Update to 1.9.1 - -* Wed Feb 07 2018 Fedora Release Engineering - 1.8.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Fri Jan 26 2018 Christopher Tubbs - 1.8.1-9 -- Remove dependency on old systemd-units, now in systemd - -* Mon Jan 15 2018 Christopher Tubbs - 1.8.1-8 -- Fix FTBFS by disabling surefire plugin - -* Mon Oct 30 2017 Mike Miller - 1.8.1-7 -- Update Jackson jar classpath locations - -* Thu Aug 03 2017 Mike Miller - 1.8.1-6 -- Specified maven and apache build dependencies - -* Wed Aug 02 2017 Fedora Release Engineering - 1.8.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.8.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Apr 13 2017 Mike Miller - 1.8.1-3 -- Added jackson-databind to classpath - -* Mon Mar 27 2017 Christopher Tubbs - 1.8.1-2 -- Clean up old patches and improve thrift 0.10.0 patch - -* Wed Mar 15 2017 Mike Miller - 1.8.1-1 -- Update to 1.8.1 - -* Fri Feb 10 2017 Fedora Release Engineering - 1.6.6-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Dec 06 2016 Christopher Tubbs - 1.6.6-13 -- Fix missing protobuf-java and hadoop config classpath bug, and systemd exit - code problems - -* Mon Dec 05 2016 Mike Miller - 1.6.6-12 -- Another fix for Shell erroneously reading accumulo-site.xml - -* Fri Dec 02 2016 Christopher Tubbs - 1.6.6-11 -- Vastly simplify out-of-box configuration and fix missing avro jar - -* Fri Dec 02 2016 Christopher Tubbs - 1.6.6-10 -- Add google-gson to classpath for monitor REST service - -* Fri Dec 02 2016 Christopher Tubbs - 1.6.6-9 -- Include Monitor (bz#1132725) - -* Thu Nov 03 2016 Christopher Tubbs - 1.6.6-8 -- Re-enable VFS 2.1 HDFS Provider (bz#1387110) - -* Wed Nov 02 2016 Mike Miller - 1.6.6-7 -- Fix for Shell erroneously reading accumulo-site.xml - -* Fri Oct 28 2016 Christopher Tubbs - 1.6.6-6 -- fix classpath (bz#1389325) and log to console - -* Thu Oct 20 2016 Christopher Tubbs - 1.6.6-5 -- Use commons-vfs 2.1 patch from upstream for f25+ - -* Thu Oct 20 2016 Christopher Tubbs - 1.6.6-4 -- Fix whitespace in native patch for fuzz=0 opt in f25+ - -* Thu Oct 20 2016 Christopher Tubbs - 1.6.6-3 -- Remove animal sniffer enforcer rule - -* Thu Oct 20 2016 Christopher Tubbs - 1.6.6-2 -- Remove modernizer plugin - -* Wed Oct 19 2016 Christopher Tubbs - 1.6.6-1 -- Update to 1.6.6 - -* Wed Feb 03 2016 Fedora Release Engineering - 1.6.4-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Thu Nov 12 2015 Christopher Tubbs - 1.6.4-4 -- Use autosetup macro to apply patches - -* Thu Nov 05 2015 Christopher Tubbs - 1.6.4-3 -- Remove unnecessary checkstyle plugin - -* Thu Nov 05 2015 Christopher Tubbs - 1.6.4-2 -- Fix patches for 1.6.4 - -* Thu Nov 05 2015 Christopher Tubbs - 1.6.4-1 -- Update to 1.6.4 - -* Thu Jun 25 2015 Christopher Tubbs - 1.6.2-1 -- Update to 1.6.2 bugfix release - -* Tue Jun 16 2015 Fedora Release Engineering - 1.6.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Mon May 04 2015 Kalev Lember - 1.6.1-4 -- Rebuilt for GCC 5 C++11 ABI change - -* Wed Apr 22 2015 Peter Robinson 1.6.1-3 -- ARMv7 now has hadoop - -* Tue Dec 16 2014 Christopher Tubbs - 1.6.1-2 -- Remove mortbay Jetty deps - -* Tue Dec 16 2014 Christopher Tubbs - 1.6.1-1 -- Update to 1.6.1 - -* Sun Sep 7 2014 Ville Skyttä - 1.6.0-7 -- Fix -debuginfo - -* Thu Aug 21 2014 Christopher Tubbs - 1.6.0-6 -- Skip javadoc generation in mvn_build when not used - -* Wed Aug 20 2014 Christopher Tubbs - 1.6.0-5 -- Use jpackage_script macro, standard java env, and working example config - -* Fri Aug 15 2014 Fedora Release Engineering - 1.6.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Wed Jul 16 2014 Christopher Tubbs - 1.6.0-3 -- Fix broken service launch scripts -- Add conditional for lib directory to build for f20 - -* Wed Jul 9 2014 Christopher Tubbs - 1.6.0-2 -- Add conditional for pom directory to build for f20 -- Remove fno-strict-aliasing flag based on upstream ACCUMULO-2762 - -* Wed Apr 30 2014 Christopher Tubbs - 1.6.0-1 -- Initial packaging diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..5204a84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Orphaned for 6+ weeks diff --git a/default-conf.patch b/default-conf.patch deleted file mode 100644 index 157a82a..0000000 --- a/default-conf.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/assemble/conf/templates/accumulo-metrics.xml b/assemble/conf/templates/accumulo-metrics.xml -index 3b97809..22ac7e9 100644 ---- a/assemble/conf/templates/accumulo-metrics.xml -+++ b/assemble/conf/templates/accumulo-metrics.xml -@@ -23,7 +23,8 @@ - Metrics log directory - --> - --

${ACCUMULO_HOME}/metrics -+ -+ /var/log/accumulo/metrics - - -- $ACCUMULO_HOME/lib/accumulo-server.jar, -- $ACCUMULO_HOME/lib/accumulo-core.jar, -- $ACCUMULO_HOME/lib/accumulo-start.jar, -- $ACCUMULO_HOME/lib/accumulo-fate.jar, -- $ACCUMULO_HOME/lib/accumulo-proxy.jar, -- $ACCUMULO_HOME/lib/[^.].*.jar, -- -- $ZOOKEEPER_HOME/zookeeper[^.].*.jar, -- -- $HADOOP_CONF_DIR, -- -- $HADOOP_PREFIX/share/hadoop/common/[^.].*.jar, -- $HADOOP_PREFIX/share/hadoop/common/lib/(?!slf4j)[^.].*.jar, -- $HADOOP_PREFIX/share/hadoop/hdfs/[^.].*.jar, -- $HADOOP_PREFIX/share/hadoop/mapreduce/[^.].*.jar, -- $HADOOP_PREFIX/share/hadoop/yarn/[^.].*.jar, -- $HADOOP_PREFIX/share/hadoop/yarn/lib/jersey.*.jar, -- -- -- /usr/lib/hadoop/[^.].*.jar, -- /usr/lib/hadoop/lib/[^.].*.jar, -- /usr/lib/hadoop-hdfs/[^.].*.jar, -- /usr/lib/hadoop-mapreduce/[^.].*.jar, -- /usr/lib/hadoop-yarn/[^.].*.jar, -- /usr/lib/hadoop-yarn/lib/jersey.*.jar, -- -- -- /usr/hdp/current/hadoop-client/[^.].*.jar, -- /usr/hdp/current/hadoop-client/lib/(?!slf4j)[^.].*.jar, -- /usr/hdp/current/hadoop-hdfs-client/[^.].*.jar, -- /usr/hdp/current/hadoop-mapreduce-client/[^.].*.jar, -- /usr/hdp/current/hadoop-yarn-client/[^.].*.jar, -- /usr/hdp/current/hadoop-yarn-client/lib/jersey.*.jar, -- /usr/hdp/current/hive-client/lib/hive-accumulo-handler.jar -- -- -- /usr/iop/current/hadoop-client/[^.].*.jar, -- /usr/iop/current/hadoop-client/lib/(?!slf4j)[^.].*.jar, -- /usr/iop/current/hadoop-hdfs-client/[^.].*.jar, -- /usr/iop/current/hadoop-mapreduce-client/[^.].*.jar, -- /usr/iop/current/hadoop-yarn-client/[^.].*.jar, -- /usr/iop/current/hadoop-yarn-client/lib/jersey.*.jar, -- /usr/iop/current/hive-client/lib/hive-accumulo-handler.jar -- -- -- $HADOOP_PREFIX/share/hadoop/client/[^.].*.jar, -- -- -+ /etc/accumulo/lib,/etc/hadoop - Classpaths that accumulo checks for updates and class files. -
-+ -+ general.dynamic.classpaths -+ /etc/accumulo/lib/ext -+ Classpaths that accumulo checks for updates and class files to dynamically load. -+ -+ - diff --git a/disabled-tests.patch b/disabled-tests.patch deleted file mode 100644 index 58c8559..0000000 --- a/disabled-tests.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java b/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java -index 0453beb..84e4ad9 100644 ---- a/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java -+++ b/shell/src/test/java/org/apache/accumulo/shell/ShellSetInstanceTest.java -@@ -53,6 +53,7 @@ import org.junit.After; - import org.junit.AfterClass; - import org.junit.Before; - import org.junit.BeforeClass; -+import org.junit.Ignore; - import org.junit.Test; - import org.junit.runner.RunWith; - import org.powermock.core.classloader.annotations.PrepareForTest; -@@ -60,6 +61,7 @@ import org.powermock.modules.junit4.PowerMockRunner; - - @RunWith(PowerMockRunner.class) - @PrepareForTest({Shell.class, ZooUtil.class, ConfigSanityCheck.class}) -+@Ignore // test skipped due to https://bugzilla.redhat.com/show_bug.cgi?id=1096992 - public class ShellSetInstanceTest { - public static class TestOutputStream extends OutputStream { - StringBuilder sb = new StringBuilder(); -diff --git a/shell/src/test/java/org/apache/accumulo/shell/commands/HistoryCommandTest.java b/shell/src/test/java/org/apache/accumulo/shell/commands/HistoryCommandTest.java -index 9b98e4a..696a090 100644 ---- a/shell/src/test/java/org/apache/accumulo/shell/commands/HistoryCommandTest.java -+++ b/shell/src/test/java/org/apache/accumulo/shell/commands/HistoryCommandTest.java -@@ -33,6 +33,7 @@ import org.apache.accumulo.core.util.shell.Shell; - import org.apache.commons.cli.CommandLine; - import org.junit.Assume; - import org.junit.Before; -+import org.junit.Ignore; - import org.junit.Test; - - public class HistoryCommandTest { -@@ -76,6 +77,7 @@ public class HistoryCommandTest { - } - - @Test -+ @Ignore // this test doesn't work in rpmbuild environment for some yet unknown reason - public void testEventExpansion() throws IOException { - // If we use an unsupported terminal, then history expansion doesn't work because JLine can't do magic buffer manipulations. - // This has been observed to be the case on certain versions of Eclipse. However, mvn is usually fine. diff --git a/fix-jetty-9.4.patch b/fix-jetty-9.4.patch deleted file mode 100644 index d891845..0000000 --- a/fix-jetty-9.4.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur accumulo-1.9.1/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java accumulo-1.9.1-mod/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java ---- accumulo-1.9.1/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java 2018-05-09 21:27:43.000000000 -0400 -+++ accumulo-1.9.1-mod/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java 2018-07-06 15:18:03.410228168 -0400 -@@ -85,7 +85,7 @@ - - handler = new ServletContextHandler(server, "/", new SessionHandler(), - new ConstraintSecurityHandler(), null, null); -- handler.getSessionHandler().getSessionManager().getSessionCookieConfig().setHttpOnly(true); -+ handler.getSessionHandler().setHttpOnly(true); - - disableTrace("/"); - } diff --git a/flot8.patch b/flot8.patch deleted file mode 100644 index 6a96191..0000000 --- a/flot8.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java -index af90b6e..561cd28 100644 ---- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java -+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java -@@ -152,6 +152,8 @@ abstract public class BasicServlet extends HttpServlet { - + " src=\"/web/flot/jquery.js\">\n"); - sb.append("\n"); -+ sb.append("\n"); - - sb.append("\n"); - diff --git a/guava.patch b/guava.patch deleted file mode 100644 index 852fe81..0000000 --- a/guava.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java b/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java -index d243dfe..35a18e2 100644 ---- a/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java -+++ b/core/src/main/java/org/apache/accumulo/core/sample/impl/DataoutputHasher.java -@@ -96,7 +96,7 @@ public class DataoutputHasher implements DataOutput { - - @Override - public void writeChars(String s) throws IOException { -- hasher.putString(s); -+ hasher.putString(s, StandardCharsets.UTF_8); - - } - -diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java -index 90f5fa0..05d2ccf 100644 ---- a/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java -+++ b/server/gc/src/main/java/org/apache/accumulo/gc/replication/CloseWriteAheadLogReferences.java -@@ -86,7 +86,7 @@ public class CloseWriteAheadLogReferences implements Runnable { - // As long as we depend on a newer Guava than Hadoop uses, we have to make sure we're compatible - // with - // what the version they bundle uses. -- Stopwatch sw = new Stopwatch(); -+ Stopwatch sw = Stopwatch.createUnstarted(); - - Connector conn; - try { -diff --git a/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java b/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java -index aa6cc4d..71651b7 100644 ---- a/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java -+++ b/server/master/src/main/java/org/apache/accumulo/master/replication/RemoveCompleteReplicationRecords.java -@@ -85,7 +85,7 @@ public class RemoveCompleteReplicationRecords implements Runnable { - WorkSection.limit(bs); - bs.addScanIterator(cfg); - -- Stopwatch sw = new Stopwatch(); -+ Stopwatch sw = Stopwatch.createUnstarted(); - long recordsRemoved = 0; - try { - sw.start(); -diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java -index c2711ed..5725d9c 100644 ---- a/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java -+++ b/test/src/main/java/org/apache/accumulo/test/functional/ScannerIT.java -@@ -75,7 +75,7 @@ public class ScannerIT extends AccumuloClusterHarness { - s.setBatchSize(1); - s.setRange(new Range()); - -- Stopwatch sw = new Stopwatch(); -+ Stopwatch sw = Stopwatch.createUnstarted(); - Iterator> iterator = s.iterator(); - - sw.start(); diff --git a/jline-shell-workaround.patch b/jline-shell-workaround.patch deleted file mode 100644 index 4bb942a..0000000 --- a/jline-shell-workaround.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/shell/src/main/java/org/apache/accumulo/shell/Shell.java b/shell/src/main/java/org/apache/accumulo/shell/Shell.java -index 31cd5d4..fdc2f50 100644 ---- a/shell/src/main/java/org/apache/accumulo/shell/Shell.java -+++ b/shell/src/main/java/org/apache/accumulo/shell/Shell.java -@@ -229,6 +229,7 @@ public class Shell extends ShellOptions implements KeywordExecutable { - private long lastUserActivity = System.nanoTime(); - private boolean logErrorsToConsole = false; - private boolean masking = false; -+ private PrintWriter writer = null; - - { - // set the JLine output encoding to some reasonable default if it isn't already set -@@ -252,6 +253,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { - public Shell(ConsoleReader reader) { - super(); - this.reader = reader; -+ this.writer = new PrintWriter(new OutputStreamWriter(System.out, Charset.forName(System.getProperty("jline.WindowsTerminal.output.encoding", -+System.getProperty("file.encoding"))))); - } - - /** -@@ -264,6 +267,8 @@ public class Shell extends ShellOptions implements KeywordExecutable { - public boolean config(String... args) throws IOException { - if (this.reader == null) - this.reader = new ConsoleReader(); -+ if (this.writer == null) -+ this.writer = new PrintWriter(new OutputStreamWriter(System.out, Charset.forName(System.getProperty("jline.WindowsTerminal.output.encoding", System.getProperty("file.encoding"))))); - ShellOptionsJC options = new ShellOptionsJC(); - JCommander jc = new JCommander(); - -@@ -726,10 +731,11 @@ public class Shell extends ShellOptions implements KeywordExecutable { - } - - public void printInfo() throws IOException { -- reader.print("\n" + SHELL_DESCRIPTION + "\n" + "- \n" + "- version: " + Constants.VERSION + "\n" -+ writer.print("\n" + SHELL_DESCRIPTION + "\n" + "- \n" + "- version: " + Constants.VERSION + "\n" - + "- instance name: " + connector.getInstance().getInstanceName() + "\n" + "- instance id: " - + connector.getInstance().getInstanceID() + "\n" + "- \n" - + "- type 'help' for a list of available commands\n" + "- \n"); -+ writer.flush(); - reader.flush(); - } - -@@ -761,7 +767,9 @@ public class Shell extends ShellOptions implements KeywordExecutable { - } - } - sb.append("-\n"); -- reader.print(sb.toString()); -+ writer.print(sb.toString()); -+ writer.flush(); -+ reader.flush(); - } - - public String getDefaultPrompt() { diff --git a/native-code.patch b/native-code.patch deleted file mode 100644 index fa657dd..0000000 --- a/native-code.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/server/native/src/main/resources/Makefile b/server/native/src/main/resources/Makefile -index 5434356..3911f57 100644 ---- a/server/native/src/main/resources/Makefile -+++ b/server/native/src/main/resources/Makefile -@@ -30,7 +30,7 @@ ifeq ($(shell uname),Linux) - JAVA_HOME=$(shell dirname "$$(dirname "$$(readlink -e "$$(which javah)")")") - endif - NATIVE_LIB := libaccumulo.so -- CXXFLAGS=-g -fPIC -shared -O3 -Wall -I'$(JAVA_HOME)'/include -I'$(JAVA_HOME)'/include/linux -Ijavah $(USERFLAGS) -+ CXXFLAGS=$(RPM_OPT_FLAGS) $(RPM_LD_FLAGS) -fPIC -shared -I'$(JAVA_HOME)'/include -I'$(JAVA_HOME)'/include/linux -Ijavah $(USERFLAGS) - endif - - ifeq ($(shell uname),Darwin) -diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java -index 536d0a2..5ed16bb 100644 ---- a/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java -+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/NativeMap.java -@@ -73,7 +73,7 @@ public class NativeMap implements Iterable> { - static { - // Check standard directories - List directories = new ArrayList<>( -- Arrays.asList(new File[] {new File("/usr/lib64"), new File("/usr/lib")})); -+ Arrays.asList(new File[] {new File("/usr/lib64/accumulo"), new File("/usr/lib/accumulo")})); - // Check in ACCUMULO_HOME location, too - String envAccumuloHome = System.getenv("ACCUMULO_HOME"); - if (envAccumuloHome != null) { diff --git a/sources b/sources deleted file mode 100644 index 67d2fb0..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (accumulo-1.9.2-src.tar.gz) = 38928ffa9e25796d1edf52075d2770e6bcfcf31a28b7a2bbc4dd90ffe2b34713bedabd8473ba6c3fd4387113f66856e9007240ece10955e5640c7682740b6b2b