From 384eedbf95264126f43fdb84c7a7bf178ba0f71e Mon Sep 17 00:00:00 2001 From: Ruslan Iushchenko Date: Fri, 7 Jun 2024 10:01:12 +0200 Subject: [PATCH] Update POM files, examples and README. --- README.md | 33 ++++++++++++++-------- cobol-converters/pom.xml | 2 +- cobol-parser/pom.xml | 2 +- examples/examples-collection/pom.xml | 2 +- examples/spark-cobol-app/build.sbt | 2 +- examples/spark-cobol-app/pom.xml | 2 +- examples/spark-cobol-s3-standalone/pom.xml | 2 +- examples/spark-cobol-s3/pom.xml | 2 +- pom.xml | 2 +- spark-cobol/pom.xml | 2 +- 10 files changed, 30 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 7d7fc45f..b6e17d18 100644 --- a/README.md +++ b/README.md @@ -74,13 +74,13 @@ You can link against this library in your program at the following coordinates: -
groupId: za.co.absa.cobrix
artifactId: spark-cobol_2.11
version: 2.7.1
+
groupId: za.co.absa.cobrix
artifactId: spark-cobol_2.11
version: 2.7.2
-
groupId: za.co.absa.cobrix
artifactId: spark-cobol_2.12
version: 2.7.1
+
groupId: za.co.absa.cobrix
artifactId: spark-cobol_2.12
version: 2.7.2
-
groupId: za.co.absa.cobrix
artifactId: spark-cobol_2.13
version: 2.7.1
+
groupId: za.co.absa.cobrix
artifactId: spark-cobol_2.13
version: 2.7.2
@@ -91,17 +91,17 @@ This package can be added to Spark using the `--packages` command line option. F ### Spark compiled with Scala 2.11 ``` -$SPARK_HOME/bin/spark-shell --packages za.co.absa.cobrix:spark-cobol_2.11:2.7.1 +$SPARK_HOME/bin/spark-shell --packages za.co.absa.cobrix:spark-cobol_2.11:2.7.2 ``` ### Spark compiled with Scala 2.12 ``` -$SPARK_HOME/bin/spark-shell --packages za.co.absa.cobrix:spark-cobol_2.12:2.7.1 +$SPARK_HOME/bin/spark-shell --packages za.co.absa.cobrix:spark-cobol_2.12:2.7.2 ``` ### Spark compiled with Scala 2.13 ``` -$SPARK_HOME/bin/spark-shell --packages za.co.absa.cobrix:spark-cobol_2.13:2.7.1 +$SPARK_HOME/bin/spark-shell --packages za.co.absa.cobrix:spark-cobol_2.13:2.7.2 ``` ## Usage @@ -238,8 +238,8 @@ to decode various binary formats. The jars that you need to get are: -* spark-cobol_2.12-2.7.1.jar -* cobol-parser_2.12-2.7.1.jar +* spark-cobol_2.12-2.7.2.jar +* cobol-parser_2.12-2.7.2.jar * scodec-core_2.12-1.10.3.jar * scodec-bits_2.12-1.1.4.jar @@ -247,9 +247,9 @@ The jars that you need to get are: After that you can specify these jars in `spark-shell` command line. Here is an example: ``` -$ spark-shell --packages za.co.absa.cobrix:spark-cobol_2.12:2.7.1 +$ spark-shell --packages za.co.absa.cobrix:spark-cobol_2.12:2.7.2 or -$ spark-shell --master yarn --deploy-mode client --driver-cores 4 --driver-memory 4G --jars spark-cobol_2.12-2.7.1.jar,cobol-parser_2.12-2.7.1.jar,scodec-core_2.12-1.10.3.jar,scodec-bits_2.12-1.1.4.jar +$ spark-shell --master yarn --deploy-mode client --driver-cores 4 --driver-memory 4G --jars spark-cobol_2.12-2.7.2.jar,cobol-parser_2.12-2.7.2.jar,scodec-core_2.12-1.10.3.jar,scodec-bits_2.12-1.1.4.jar Setting default log level to "WARN". To adjust logging level use sc.setLogLevel(newLevel). For SparkR, use setLogLevel(newLevel). @@ -316,11 +316,11 @@ Creating an uber jar for Cobrix is very easy. Steps to build: You can collect the uber jar of `spark-cobol` either at `spark-cobol/target/scala-2.11/` or in `spark-cobol/target/scala-2.12/` depending on the Scala version you used. -The fat jar will have '-bundle' suffix. You can also download pre-built bundles from https://github.com/AbsaOSS/cobrix/releases/tag/v2.7.1 +The fat jar will have '-bundle' suffix. You can also download pre-built bundles from https://github.com/AbsaOSS/cobrix/releases/tag/v2.7.2 Then, run `spark-shell` or `spark-submit` adding the fat jar as the option. ```sh -$ spark-shell --jars spark-cobol_2.12_3.3-2.7.2-SNAPSHOT-bundle.jar +$ spark-shell --jars spark-cobol_2.12_3.3-2.7.3-SNAPSHOT-bundle.jar ``` > A note for building and running tests on Windows @@ -1752,6 +1752,15 @@ at org.apache.hadoop.io.nativeio.NativeIO$POSIX.getStat(NativeIO.java:608) A: Update hadoop dll to version 3.2.2 or newer. ## Changelog +- #### 2.7.2 released 7 June 2024. + - [#684](https://github.com/AbsaOSS/cobrix/issues/684) Fixed failing to read a data file in certain combination of options. + - [#685](https://github.com/AbsaOSS/cobrix/issues/685) Added methods to flatten schema of a dataframe more effective than `flattenSchema()`, but does not flatten arrays: + ```scala + // df - a DataFrame with nested structs + val flatDf = SparkUtils.unstructDataFrame(df) + // flatDf the same dataframe with all nested fields promoted to the top level. + ``` + - #### 2.7.1 released 4 June 2024. - [#680](https://github.com/AbsaOSS/cobrix/issues/680) Shaded ANTLR runtime in 'cobol-parser' to avoid conflicts with various versions of Spark that uses ANTLR as well. - [#678](https://github.com/AbsaOSS/cobrix/issues/678) Added an experimental method `SparkUtils.covertIntegralToDecimal()` for applying extended metadata to a DataFrame. diff --git a/cobol-converters/pom.xml b/cobol-converters/pom.xml index c45d6cb8..86b4cac4 100644 --- a/cobol-converters/pom.xml +++ b/cobol-converters/pom.xml @@ -22,7 +22,7 @@ za.co.absa.cobrix cobrix_2.12 - 2.7.2-SNAPSHOT + 2.7.3-SNAPSHOT ../pom.xml diff --git a/cobol-parser/pom.xml b/cobol-parser/pom.xml index 04dff6b8..eaacf581 100644 --- a/cobol-parser/pom.xml +++ b/cobol-parser/pom.xml @@ -22,7 +22,7 @@ za.co.absa.cobrix cobrix_2.12 - 2.7.2-SNAPSHOT + 2.7.3-SNAPSHOT ../pom.xml diff --git a/examples/examples-collection/pom.xml b/examples/examples-collection/pom.xml index 19464885..7d8d9f0f 100644 --- a/examples/examples-collection/pom.xml +++ b/examples/examples-collection/pom.xml @@ -31,7 +31,7 @@ 2.11 2.4.8 2.4.16 - 2.7.1 + 2.7.2 diff --git a/examples/spark-cobol-app/build.sbt b/examples/spark-cobol-app/build.sbt index e331af8c..35275e80 100644 --- a/examples/spark-cobol-app/build.sbt +++ b/examples/spark-cobol-app/build.sbt @@ -20,7 +20,7 @@ ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / scalaVersion := "2.12.17" val sparkVersion = "3.3.2" -val sparkCobolVersion = "2.7.1" +val sparkCobolVersion = "2.7.2" val scalatestVersion = "3.2.14" ThisBuild / libraryDependencies ++= Seq( diff --git a/examples/spark-cobol-app/pom.xml b/examples/spark-cobol-app/pom.xml index 3e54a676..01561fd8 100755 --- a/examples/spark-cobol-app/pom.xml +++ b/examples/spark-cobol-app/pom.xml @@ -31,7 +31,7 @@ 2.12 3.2.14 3.3.2 - 2.7.1 + 2.7.2 diff --git a/examples/spark-cobol-s3-standalone/pom.xml b/examples/spark-cobol-s3-standalone/pom.xml index e684062c..604bb8e7 100644 --- a/examples/spark-cobol-s3-standalone/pom.xml +++ b/examples/spark-cobol-s3-standalone/pom.xml @@ -32,7 +32,7 @@ 2.11 3.2.3 2.4.8 - 2.7.1 + 2.7.2 3.2.4 diff --git a/examples/spark-cobol-s3/pom.xml b/examples/spark-cobol-s3/pom.xml index c7699ef1..d0b9e5ae 100644 --- a/examples/spark-cobol-s3/pom.xml +++ b/examples/spark-cobol-s3/pom.xml @@ -32,7 +32,7 @@ 2.11 3.2.14 2.4.8 - 2.7.1 + 2.7.2 diff --git a/pom.xml b/pom.xml index adcffc16..0bbfc080 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ za.co.absa.cobrix cobrix_2.12 - 2.7.2-SNAPSHOT + 2.7.3-SNAPSHOT pom diff --git a/spark-cobol/pom.xml b/spark-cobol/pom.xml index 5307d127..6984b125 100644 --- a/spark-cobol/pom.xml +++ b/spark-cobol/pom.xml @@ -22,7 +22,7 @@ za.co.absa.cobrix cobrix_2.12 - 2.7.2-SNAPSHOT + 2.7.3-SNAPSHOT ../pom.xml