From 026865f2a36d9685057c407e3fa528c101ab46b7 Mon Sep 17 00:00:00 2001 From: Sylvain Lebresne Date: Wed, 20 Nov 2013 09:43:28 +0100 Subject: [PATCH 1/2] Update versions, licenses for 1.2.12 release --- build.xml | 2 +- debian/changelog | 6 ++++++ .../cassandra/pig/CqlTableDataTypeTest.java | 21 +++++++++++++++++++ .../pig/ThriftColumnFamilyDataTypeTest.java | 21 +++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) diff --git a/build.xml b/build.xml index 50323caf7b..8efb7a3869 100644 --- a/build.xml +++ b/build.xml @@ -25,7 +25,7 @@ - + diff --git a/debian/changelog b/debian/changelog index 6643ed9e30..93894b1d43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cassandra (1.2.12) unstable; urgency=low + + * New release + + -- Sylvain Lebresne Wed, 20 Nov 2013 09:41:23 +0100 + cassandra (1.2.11) unstable; urgency=low * New release diff --git a/test/unit/org/apache/cassandra/pig/CqlTableDataTypeTest.java b/test/unit/org/apache/cassandra/pig/CqlTableDataTypeTest.java index a0f1f4756b..c81ff0797f 100644 --- a/test/unit/org/apache/cassandra/pig/CqlTableDataTypeTest.java +++ b/test/unit/org/apache/cassandra/pig/CqlTableDataTypeTest.java @@ -1,4 +1,25 @@ package org.apache.cassandra.pig; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + import java.io.IOException; import java.nio.charset.CharacterCodingException; diff --git a/test/unit/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java b/test/unit/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java index 2f97549929..2cf1c89292 100644 --- a/test/unit/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java +++ b/test/unit/org/apache/cassandra/pig/ThriftColumnFamilyDataTypeTest.java @@ -1,4 +1,25 @@ package org.apache.cassandra.pig; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + import java.io.IOException; import java.nio.charset.CharacterCodingException; From 5f79f5321bbbbac383b727fbbf60891b4c5e4136 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Wed, 20 Nov 2013 10:19:17 -0600 Subject: [PATCH 2/2] update pig example scripts Patch by Jeremy Hanna, reviewed by brandonwilliams for CASSANDRA-6239 --- examples/pig/example-script-cql.pig | 11 +++++++++++ examples/pig/example-script.pig | 14 +------------- 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 examples/pig/example-script-cql.pig diff --git a/examples/pig/example-script-cql.pig b/examples/pig/example-script-cql.pig new file mode 100644 index 0000000000..63656a748d --- /dev/null +++ b/examples/pig/example-script-cql.pig @@ -0,0 +1,11 @@ +-- CqlStorage +libdata = LOAD 'cql://libdata/libout' USING CqlStorage(); +book_by_mail = FILTER libdata BY C_OUT_TY == 'BM'; + +libdata_buildings = FILTER libdata BY SQ_FEET > 0; +state_flat = FOREACH libdata_buildings GENERATE STABR AS State,SQ_FEET AS SquareFeet; +state_grouped = GROUP state_flat BY State; +state_footage = FOREACH state_grouped GENERATE group AS State, SUM(state_flat.SquareFeet) AS TotalFeet:int; + +insert_format= FOREACH state_footage GENERATE TOTUPLE(TOTUPLE('year',2011),TOTUPLE('state',State)),TOTUPLE(TotalFeet); +STORE insert_format INTO 'cql://libdata/libsqft?output_query=UPDATE%20libdata.libsqft%20SET%20sqft%20%3D%20%3F' USING CqlStorage; \ No newline at end of file diff --git a/examples/pig/example-script.pig b/examples/pig/example-script.pig index 8b69b995a5..d47fc28849 100644 --- a/examples/pig/example-script.pig +++ b/examples/pig/example-script.pig @@ -6,16 +6,4 @@ namegroups = GROUP colnames BY (chararray) $0; namecounts = FOREACH namegroups GENERATE COUNT($1), group; orderednames = ORDER namecounts BY $0 DESC; topnames = LIMIT orderednames 50; -dump topnames; - --- CqlStorage -libdata = LOAD 'cql://libdata/libout' USING CqlStorage(); -book_by_mail = FILTER libdata BY C_OUT_TY == 'BM'; - -libdata_buildings = FILTER libdata BY SQ_FEET > 0; -state_flat = FOREACH libdata_buildings GENERATE STABR AS State,SQ_FEET AS SquareFeet; -state_grouped = GROUP state_flat BY State; -state_footage = FOREACH state_grouped GENERATE GROUP AS State, SUM(state_flat.SquareFeet) AS TotalFeet:int; - -insert_format= FOREACH state_footage GENERATE TOTUPLE(TOTUPLE('year',2011),TOTUPLE('state',State)),TOTUPLE(TotalFeet); -STORE insert_format INTO 'cql://libdata/libsqft?output_query=UPDATE%20libdata.libsqft%20SET%20sqft%20%3D%20%3F' USING CqlStorage; \ No newline at end of file +dump topnames; \ No newline at end of file