cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [cassandra] branch cassandra-3.11 updated: update Jackson to 2.9.10
Date Wed, 17 Jun 2020 16:22:42 GMT
This is an automated email from the ASF dual-hosted git repository.

brandonwilliams pushed a commit to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.11 by this push:
     new 576cb2b  update Jackson to 2.9.10
576cb2b is described below

commit 576cb2b8a4267467b507cb88e841462314d2aaee
Author: Stefan Miklosovic <stefan.miklosovic@instaclustr.com>
AuthorDate: Sat Jun 13 17:09:00 2020 +0200

    update Jackson to 2.9.10
    
    Patch by Stefan Miklosovic, reviewed by brandonwilliams for
    CASSANDRA-15867
---
 CHANGES.txt                                           |   1 +
 build.xml                                             |  10 ++++++----
 lib/jackson-annotations-2.9.10.jar                    | Bin 0 -> 66894 bytes
 lib/jackson-core-2.9.10.jar                           | Bin 0 -> 325636 bytes
 lib/jackson-core-asl-1.9.13.jar                       | Bin 232248 -> 0 bytes
 lib/jackson-databind-2.9.10.4.jar                     | Bin 0 -> 1349395 bytes
 lib/jackson-mapper-asl-1.9.13.jar                     | Bin 780664 -> 0 bytes
 src/java/org/apache/cassandra/cql3/Json.java          |   4 ++--
 .../org/apache/cassandra/tools/JsonTransformer.java   |  12 +++++-------
 src/java/org/apache/cassandra/utils/FBUtilities.java  |   5 ++---
 .../apache/cassandra/index/sasi/SASIIndexTest.java    |  14 +++++++-------
 11 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 0f730d4..114ce07 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.11.7
+ * Upgrade Jackson to 2.9.10 (CASSANDRA-15867)
  * Fix CQL formatting of read command restrictions for slow query log (CASSANDRA-15503)
  * Allow sstableloader to use SSL on the native port (CASSANDRA-14904)
 Merged from 3.0:
diff --git a/build.xml b/build.xml
index 0724dbb..25a4733 100644
--- a/build.xml
+++ b/build.xml
@@ -406,8 +406,9 @@
           <dependency groupId="org.slf4j" artifactId="jcl-over-slf4j" version="1.7.7"
/>
           <dependency groupId="ch.qos.logback" artifactId="logback-core" version="1.1.3"/>
           <dependency groupId="ch.qos.logback" artifactId="logback-classic" version="1.1.3"/>
-          <dependency groupId="org.codehaus.jackson" artifactId="jackson-core-asl" version="1.9.2"/>
-          <dependency groupId="org.codehaus.jackson" artifactId="jackson-mapper-asl" version="1.9.2"/>
+          <dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-core" version="2.9.10"/>
+          <dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-databind"
version="2.9.10.4"/>
+          <dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-annotations"
version="2.9.10"/>
           <dependency groupId="com.googlecode.json-simple" artifactId="json-simple" version="1.1"/>
           <dependency groupId="com.boundary" artifactId="high-scale-lib" version="1.0.6"/>
           <dependency groupId="com.github.jbellis" artifactId="jamm" version="0.3.0"/>
@@ -627,8 +628,9 @@
         <dependency groupId="org.slf4j" artifactId="slf4j-api"/>
         <dependency groupId="org.slf4j" artifactId="log4j-over-slf4j"/>
         <dependency groupId="org.slf4j" artifactId="jcl-over-slf4j"/>
-        <dependency groupId="org.codehaus.jackson" artifactId="jackson-core-asl"/>
-        <dependency groupId="org.codehaus.jackson" artifactId="jackson-mapper-asl"/>
+        <dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-core"/>
+        <dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-databind"/>
+        <dependency groupId="com.fasterxml.jackson.core" artifactId="jackson-annotations"/>
         <dependency groupId="com.googlecode.json-simple" artifactId="json-simple"/>
         <dependency groupId="com.boundary" artifactId="high-scale-lib"/>
         <dependency groupId="org.yaml" artifactId="snakeyaml"/>
diff --git a/lib/jackson-annotations-2.9.10.jar b/lib/jackson-annotations-2.9.10.jar
new file mode 100644
index 0000000..de054c6
Binary files /dev/null and b/lib/jackson-annotations-2.9.10.jar differ
diff --git a/lib/jackson-core-2.9.10.jar b/lib/jackson-core-2.9.10.jar
new file mode 100644
index 0000000..1b5e87c
Binary files /dev/null and b/lib/jackson-core-2.9.10.jar differ
diff --git a/lib/jackson-core-asl-1.9.13.jar b/lib/jackson-core-asl-1.9.13.jar
deleted file mode 100644
index bb4fe1d..0000000
Binary files a/lib/jackson-core-asl-1.9.13.jar and /dev/null differ
diff --git a/lib/jackson-databind-2.9.10.4.jar b/lib/jackson-databind-2.9.10.4.jar
new file mode 100644
index 0000000..9045f2f
Binary files /dev/null and b/lib/jackson-databind-2.9.10.4.jar differ
diff --git a/lib/jackson-mapper-asl-1.9.13.jar b/lib/jackson-mapper-asl-1.9.13.jar
deleted file mode 100644
index 0f2073f..0000000
Binary files a/lib/jackson-mapper-asl-1.9.13.jar and /dev/null differ
diff --git a/src/java/org/apache/cassandra/cql3/Json.java b/src/java/org/apache/cassandra/cql3/Json.java
index 2e67a1e..af004a8 100644
--- a/src/java/org/apache/cassandra/cql3/Json.java
+++ b/src/java/org/apache/cassandra/cql3/Json.java
@@ -20,6 +20,8 @@ package org.apache.cassandra.cql3;
 import java.io.IOException;
 import java.util.*;
 
+import com.fasterxml.jackson.core.io.JsonStringEncoder;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.ColumnDefinition;
 import org.apache.cassandra.cql3.functions.Function;
@@ -27,8 +29,6 @@ import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.marshal.UTF8Type;
 import org.apache.cassandra.exceptions.InvalidRequestException;
 import org.apache.cassandra.serializers.MarshalException;
-import org.codehaus.jackson.io.JsonStringEncoder;
-import org.codehaus.jackson.map.ObjectMapper;
 
 /** Term-related classes for INSERT JSON support. */
 public class Json
diff --git a/src/java/org/apache/cassandra/tools/JsonTransformer.java b/src/java/org/apache/cassandra/tools/JsonTransformer.java
index 22b8fc7..315bb7f 100644
--- a/src/java/org/apache/cassandra/tools/JsonTransformer.java
+++ b/src/java/org/apache/cassandra/tools/JsonTransformer.java
@@ -30,6 +30,9 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Stream;
 
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.ColumnDefinition;
 import org.apache.cassandra.db.*;
@@ -49,11 +52,6 @@ import org.apache.cassandra.db.rows.UnfilteredRowIterator;
 import org.apache.cassandra.io.sstable.ISSTableScanner;
 import org.apache.cassandra.transport.ProtocolVersion;
 import org.apache.cassandra.utils.ByteBufferUtil;
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonGenerator;
-import org.codehaus.jackson.impl.Indenter;
-import org.codehaus.jackson.util.DefaultPrettyPrinter;
-import org.codehaus.jackson.util.DefaultPrettyPrinter.NopIndenter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -500,10 +498,10 @@ public final class JsonTransformer
     }
 
     /**
-     * A specialized {@link Indenter} that enables a 'compact' mode which puts all subsequent
json values on the same
+     * A specialized {@link com.fasterxml.jackson.core.util.DefaultPrettyPrinter.Indenter}
that enables a 'compact' mode which puts all subsequent json values on the same
      * line. This is manipulated via {@link CompactIndenter#setCompact(boolean)}
      */
-    private static final class CompactIndenter extends NopIndenter
+    private static final class CompactIndenter extends DefaultPrettyPrinter.NopIndenter
     {
 
         private static final int INDENT_LEVELS = 16;
diff --git a/src/java/org/apache/cassandra/utils/FBUtilities.java b/src/java/org/apache/cassandra/utils/FBUtilities.java
index 22ed33c..e5dc2be 100644
--- a/src/java/org/apache/cassandra/utils/FBUtilities.java
+++ b/src/java/org/apache/cassandra/utils/FBUtilities.java
@@ -41,6 +41,8 @@ import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.fasterxml.jackson.core.JsonFactory;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import io.netty.util.concurrent.FastThreadLocal;
 import org.apache.cassandra.auth.IAuthenticator;
 import org.apache.cassandra.auth.IAuthorizer;
@@ -65,9 +67,6 @@ import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.locator.InetAddressAndPort;
 import org.apache.cassandra.net.AsyncOneResponse;
 
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.map.ObjectMapper;
-
 public class FBUtilities
 {
     private static final Logger logger = LoggerFactory.getLogger(FBUtilities.class);
diff --git a/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java b/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java
index 1579857..7def47c 100644
--- a/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java
+++ b/test/unit/org/apache/cassandra/index/sasi/SASIIndexTest.java
@@ -26,6 +26,7 @@ import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.attribute.BasicFileAttributes;
 import java.util.*;
+import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ThreadLocalRandom;
@@ -1187,13 +1188,12 @@ public class SASIIndexTest
         }});
         rm.apply();
 
-        store.forceBlockingFlush();
-
-        Set<String> rows = getIndexed(store, 10, buildExpression(firstName, Operator.EQ,
UTF8Type.instance.decompose("a")),
-                                                 buildExpression(age, Operator.GTE, Int32Type.instance.decompose(26)));
-
-        // index is expected to have 0 results because age value was of wrong type
-        Assert.assertEquals(0, rows.size());
+        try {
+            store.forceBlockingFlush();
+            Assert.fail("It was possible to insert data of wrong type into a column!");
+        } catch (final Throwable ex) {
+            Assert.assertTrue(ex.getMessage().endsWith("Expected exactly 4 bytes, but was
8"));
+        }
     }
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message