diff --git a/0001-use-antrun-plugin-and-update-thrift-to-0.14.0.patch b/0001-use-antrun-plugin-and-update-thrift-to-0.14.0.patch new file mode 100644 index 0000000..bac37da --- /dev/null +++ b/0001-use-antrun-plugin-and-update-thrift-to-0.14.0.patch @@ -0,0 +1,146 @@ +From a679e4ef3b9f9ea450672e68d864c6f4e133ce6d Mon Sep 17 00:00:00 2001 +From: bzg1107 +Date: Mon, 2 Aug 2021 17:59:28 +0800 +Subject: [PATCH] use antrun plugin and update thrift to 0.14.0 + +--- + .github/workflows/test.yml | 4 +-- + .gitignore | 1 + + pom.xml | 35 +++++++++++-------- + .../parquet/format/InterningProtocol.java | 5 +++ + .../java/org/apache/parquet/format/Util.java | 5 +-- + 5 files changed, 31 insertions(+), 19 deletions(-) + +diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml +index a93eee5..deddca4 100644 +--- a/.github/workflows/test.yml ++++ b/.github/workflows/test.yml +@@ -40,8 +40,8 @@ jobs: + sudo apt-get update -qq + sudo apt-get install -qq protobuf-compiler + sudo apt-get install -qq libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev +- wget -qO- https://archive.apache.org/dist/thrift/0.13.0/thrift-0.13.0.tar.gz | tar zxf - +- cd thrift-0.13.0/ ++ wget -qO- https://archive.apache.org/dist/thrift/0.14.0/thrift-0.14.0.tar.gz | tar zxf - ++ cd thrift-0.14.0/ + chmod +x ./configure + ./configure --disable-libs + sudo make install +diff --git a/.gitignore b/.gitignore +index 944e4a2..6eed724 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -23,3 +23,4 @@ dependency-reduced-pom.xml + + # IDE stuff + .idea/ ++*.iml +diff --git a/pom.xml b/pom.xml +index aeec130..ed80eaf 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -86,7 +86,7 @@ + 1.8 + shaded.parquet + thrift +- 0.13.0 ++ 0.14.0 + 0.10.0 + + +@@ -94,19 +94,29 @@ + + + +- org.apache.thrift +- thrift-maven-plugin +- ${thrift-maven-plugin.version} +- +- src/main/thrift +- ${thrift.executable} +- ++ org.apache.maven.plugins ++ maven-antrun-plugin ++ 1.7 + + +- thrift-sources + generate-sources ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- compile ++ run + + + +@@ -187,11 +197,6 @@ + libthrift + ${thrift.version} + +- +- javax.annotation +- javax.annotation-api +- 1.3.2 +- + + junit + junit +diff --git a/src/main/java/org/apache/parquet/format/InterningProtocol.java b/src/main/java/org/apache/parquet/format/InterningProtocol.java +index 843a02c..90a1170 100644 +--- a/src/main/java/org/apache/parquet/format/InterningProtocol.java ++++ b/src/main/java/org/apache/parquet/format/InterningProtocol.java +@@ -224,6 +224,11 @@ public class InterningProtocol extends TProtocol { + return delegate.readBinary(); + } + ++ @Override ++ public int getMinSerializedSize(byte b) throws TException { ++ return delegate.getMinSerializedSize(b); ++ } ++ + public void reset() { + delegate.reset(); + } +diff --git a/src/main/java/org/apache/parquet/format/Util.java b/src/main/java/org/apache/parquet/format/Util.java +index 0532bce..0c831b6 100644 +--- a/src/main/java/org/apache/parquet/format/Util.java ++++ b/src/main/java/org/apache/parquet/format/Util.java +@@ -47,6 +47,7 @@ import org.apache.parquet.format.event.EventBasedThriftReader; + import org.apache.parquet.format.event.TypedConsumer.I32Consumer; + import org.apache.parquet.format.event.TypedConsumer.I64Consumer; + import org.apache.parquet.format.event.TypedConsumer.StringConsumer; ++import org.apache.thrift.transport.TTransportException; + + /** + * Utility to read/write metadata +@@ -207,11 +208,11 @@ public class Util { + } + } + +- private static TProtocol protocol(OutputStream to) { ++ private static TProtocol protocol(OutputStream to) throws TTransportException { + return protocol(new TIOStreamTransport(to)); + } + +- private static TProtocol protocol(InputStream from) { ++ private static TProtocol protocol(InputStream from) throws TTransportException { + return protocol(new TIOStreamTransport(from)); + } + +-- +2.30.0 + diff --git a/apache-parquet-format-2.9.0.tar.gz b/apache-parquet-format-2.9.0.tar.gz new file mode 100644 index 0000000..43bd466 Binary files /dev/null and b/apache-parquet-format-2.9.0.tar.gz differ diff --git a/parquet-format.spec b/parquet-format.spec new file mode 100644 index 0000000..ce55038 --- /dev/null +++ b/parquet-format.spec @@ -0,0 +1,47 @@ +Name: parquet-format +Version: 2.9.0 +Release: 1 +Summary: Columnar file format for Hadoop +License: Apache-2.0 and MIT +URL: http://parquet.io/ +Source0: https://github.com/apache/parquet-format/archive/refs/tags/apache-parquet-format-2.9.0.tar.gz +Patch0: 0001-use-antrun-plugin-and-update-thrift-to-0.14.0.patch + +BuildRequires: maven maven-local +BuildRequires: mvn(junit:junit) +BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) +BuildRequires: mvn(org.slf4j:slf4j-api) exec-maven-plugin apache-rat-plugin +BuildRequires: thrift mvn(org.apache.thrift:libthrift) +BuildArch: noarch + +%description +Parquet is a columnar storage format that supports nested data. +This provides all generated meta-data code. + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +This package contains javadoc for %{name}. + +%prep +%autosetup -n %{name}-apache-%{name}-%{version} -p1 +%pom_remove_plugin :maven-shade-plugin +chmod 644 LICENSE + +%build +%mvn_build --bootstrap -- -Drat.skip=true + +%install +%mvn_install -- -Drat.skip=true + +%files -f .mfiles +%doc CONTRIBUTING.md README.md +%license LICENSE + +%files javadoc -f .mfiles-javadoc +%license LICENSE + +%changelog +* Fri Jul 2 2021 baizhonggui - 2.9.0-1 +- Package init