Merge branch 'cassandra-2.2' into cassandra-3.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b360653f Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b360653f Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b360653f Branch: refs/heads/cassandra-3.0 Commit: b360653fcfe07a7af66107ef9e55fdc9e33c1d0a Parents: 7a2be8f 88f22b9 Author: Stefania Alborghetti <stefania.alborghe...@datastax.com> Authored: Thu Apr 28 09:12:56 2016 +0800 Committer: Stefania Alborghetti <stefania.alborghe...@datastax.com> Committed: Thu Apr 28 09:18:07 2016 +0800 ---------------------------------------------------------------------- CHANGES.txt | 1 + NEWS.txt | 8 ++++++++ .../apache/cassandra/serializers/TimestampSerializer.java | 9 ++++++--- .../apache/cassandra/cql3/validation/entities/JsonTest.java | 6 ++++-- 4 files changed, 19 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b360653f/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index 8877fa9,91179b3..46206b1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,18 -1,5 +1,19 @@@ -2.2.7 +3.0.6 + * Don't require HEAP_NEW_SIZE to be set when using G1 (CASSANDRA-11600) + * Fix sstabledump not showing cells after tombstone marker (CASSANDRA-11654) + * Ignore all LocalStrategy keyspaces for streaming and other related + operations (CASSANDRA-11627) + * Ensure columnfilter covers indexed columns for thrift 2i queries (CASSANDRA-11523) + * Only open one sstable scanner per sstable (CASSANDRA-11412) + * Option to specify ProtocolVersion in cassandra-stress (CASSANDRA-11410) + * ArithmeticException in avgFunctionForDecimal (CASSANDRA-11485) + * LogAwareFileLister should only use OLD sstable files in current folder to determine disk consistency (CASSANDRA-11470) + * Notify indexers of expired rows during compaction (CASSANDRA-11329) + * Properly respond with ProtocolError when a v1/v2 native protocol + header is received (CASSANDRA-11464) + * Validate that num_tokens and initial_token are consistent with one another (CASSANDRA-10120) +Merged from 2.2: + * JSON datetime formatting needs timezone (CASSANDRA-11137) * Fix is_dense recalculation for Thrift-updated tables (CASSANDRA-11502) * Remove unnescessary file existence check during anticompaction (CASSANDRA-11660) * Add missing files to debian packages (CASSANDRA-11642) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b360653f/NEWS.txt ---------------------------------------------------------------------- diff --cc NEWS.txt index 1b982cb,a3ba0dd..d13f94f --- a/NEWS.txt +++ b/NEWS.txt @@@ -13,7 -13,15 +13,15 @@@ restore snapshots created with the prev 'sstableloader' tool. You can upgrade the file format of your snapshots using the provided 'sstableupgrade' tool. -2.2.7 ++3.0.6 + ===== + + New features + ------------ - - JSON timestamps are now in UTC and contain the timezone information, see - CASSANDRA-11137 for more details. ++ - JSON timestamps are now in UTC and contain the timezone information, see ++ CASSANDRA-11137 for more details. + -2.2.6 +3.0.5 ===== Upgrading http://git-wip-us.apache.org/repos/asf/cassandra/blob/b360653f/src/java/org/apache/cassandra/serializers/TimestampSerializer.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/serializers/TimestampSerializer.java index fbd98d1,77a5df9..9bd9a8d --- a/src/java/org/apache/cassandra/serializers/TimestampSerializer.java +++ b/src/java/org/apache/cassandra/serializers/TimestampSerializer.java @@@ -97,26 -96,16 +97,29 @@@ public class TimestampSerializer implem } }; + private static final String UTC_FORMAT = dateStringPatterns[40]; + private static final ThreadLocal<SimpleDateFormat> FORMATTER_UTC = new ThreadLocal<SimpleDateFormat>() + { + protected SimpleDateFormat initialValue() + { + SimpleDateFormat sdf = new SimpleDateFormat(UTC_FORMAT); + sdf.setTimeZone(TimeZone.getTimeZone("UTC")); + return sdf; + } + }; + + private static final String TO_JSON_FORMAT = dateStringPatterns[19]; private static final ThreadLocal<SimpleDateFormat> FORMATTER_TO_JSON = new ThreadLocal<SimpleDateFormat>() { protected SimpleDateFormat initialValue() { - return new SimpleDateFormat(dateStringPatterns[15]); + SimpleDateFormat sdf = new SimpleDateFormat(TO_JSON_FORMAT); + sdf.setTimeZone(TimeZone.getTimeZone("UTC")); + return sdf; } }; + + public static final TimestampSerializer instance = new TimestampSerializer(); http://git-wip-us.apache.org/repos/asf/cassandra/blob/b360653f/test/unit/org/apache/cassandra/cql3/validation/entities/JsonTest.java ----------------------------------------------------------------------