This is an automated email from the ASF dual-hosted git repository.
shangxinli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git
The following commit(s) were added to refs/heads/master by this push:
new 62b774cd0 PARQUET-2142: parquet-cli without hadoop throws
java.lang.NoSuchMethodError on any parquet file access command (#990)
62b774cd0 is described below
commit 62b774cd0f0c60cfbe540bbfa60bee15929af5d4
Author: Kengo Seki <[email protected]>
AuthorDate: Mon Oct 10 04:12:41 2022 +0900
PARQUET-2142: parquet-cli without hadoop throws java.lang.NoSuchMethodError
on any parquet file access command (#990)
---
parquet-cli/README.md | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/parquet-cli/README.md b/parquet-cli/README.md
index d17d7199c..da1d12319 100644
--- a/parquet-cli/README.md
+++ b/parquet-cli/README.md
@@ -31,13 +31,13 @@ mvn clean install -DskipTests
The build produces a shaded Jar that can be run using the `hadoop` command:
```
-hadoop jar parquet-cli-1.9.1-runtime.jar org.apache.parquet.cli.Main
+hadoop jar parquet-cli-1.12.3-runtime.jar org.apache.parquet.cli.Main
```
For a shorter command-line invocation, add an alias to your shell like this:
```
-alias parquet="hadoop jar /path/to/parquet-cli-1.9.1-runtime.jar
org.apache.parquet.cli.Main --dollar-zero parquet"
+alias parquet="hadoop jar /path/to/parquet-cli-1.12.3-runtime.jar
org.apache.parquet.cli.Main --dollar-zero parquet"
```
### Running without Hadoop
@@ -51,9 +51,14 @@ mvn dependency:copy-dependencies
Then, run the command-line and add `target/dependencies/*` to the classpath:
```
-java -cp 'target/*:target/dependency/*' org.apache.parquet.cli.Main
+java -cp 'target/parquet-cli-1.12.3.jar:target/dependency/*'
org.apache.parquet.cli.Main
```
+Note that you shouldn't include the runtime jar used above into the classpath
in this case.
+In that jar, the `org.apache.avro package` is relocated for avoiding conflict
with Hadoop's one.
+That relocation changes method signatures, so it can cause `NoSuchMethodError`
depending on the class loading order.
+See PARQUET-2142 for details.
+
### Help
@@ -100,7 +105,7 @@ Usage: parquet [options] [command] [command options]
Examples:
# print information for create
- parquet help create
+ parquet help meta
See 'parquet help <command>' for more information on a specific command.
```