diff --git a/lib/asm-all-2.2.1.jar b/lib/asm-all-2.2.1.jar deleted file mode 100644 index 8e7ee3186d..0000000000 Binary files a/lib/asm-all-2.2.1.jar and /dev/null differ diff --git a/src/java/org/apache/cassandra/concurrent/ContinuationContext.java b/src/java/org/apache/cassandra/concurrent/ContinuationContext.java index 8a04751029..98e48f0fce 100644 --- a/src/java/org/apache/cassandra/concurrent/ContinuationContext.java +++ b/src/java/org/apache/cassandra/concurrent/ContinuationContext.java @@ -18,7 +18,6 @@ package org.apache.cassandra.concurrent; -import org.apache.cassandra.continuations.Suspendable; import org.apache.commons.javaflow.Continuation; public class ContinuationContext diff --git a/src/java/org/apache/cassandra/concurrent/ContinuationStage.java b/src/java/org/apache/cassandra/concurrent/ContinuationStage.java index d8bdfc037f..c1f6189cff 100644 --- a/src/java/org/apache/cassandra/concurrent/ContinuationStage.java +++ b/src/java/org/apache/cassandra/concurrent/ContinuationStage.java @@ -25,8 +25,6 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; -import org.apache.cassandra.continuations.Suspendable; - public class ContinuationStage implements IStage { diff --git a/src/java/org/apache/cassandra/continuations/CAgent.java b/src/java/org/apache/cassandra/continuations/CAgent.java deleted file mode 100644 index e6a9459ed1..0000000000 --- a/src/java/org/apache/cassandra/continuations/CAgent.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * 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. - */ - -package org.apache.cassandra.continuations; - -import java.lang.instrument.Instrumentation; - -import org.apache.commons.javaflow.bytecode.transformation.bcel.BcelClassTransformer; - - -/** - * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com ) - */ - -public class CAgent -{ - public static void premain(String agentArguments, Instrumentation instrumentation) - { - instrumentation.addTransformer(new ContinuationClassTransformer(agentArguments, new BcelClassTransformer())); - } -} diff --git a/src/java/org/apache/cassandra/continuations/ContinuationClassTransformer.java b/src/java/org/apache/cassandra/continuations/ContinuationClassTransformer.java deleted file mode 100644 index 285c97e972..0000000000 --- a/src/java/org/apache/cassandra/continuations/ContinuationClassTransformer.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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. - */ - -package org.apache.cassandra.continuations; - -import java.lang.annotation.Annotation; -import java.lang.instrument.ClassFileTransformer; -import java.lang.instrument.IllegalClassFormatException; -import java.security.ProtectionDomain; -import java.util.List; -import java.util.Set; -import java.util.HashSet; -import java.util.StringTokenizer; -import org.objectweb.asm.ClassReader; -import org.objectweb.asm.tree.AnnotationNode; -import org.objectweb.asm.tree.ClassNode; -import org.objectweb.asm.tree.MethodNode; -import org.apache.commons.javaflow.bytecode.transformation.ResourceTransformer; -import org.apache.commons.javaflow.bytecode.transformation.bcel.BcelClassTransformer; - - -/** - * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com ) - */ - -class ContinuationClassTransformer implements ClassFileTransformer -{ - private static final String targetAnnotation_ = "Suspendable"; - private ResourceTransformer transformer_; - - public ContinuationClassTransformer(String agentArguments, ResourceTransformer transformer) - { - super(); - transformer_ = transformer; - } - - public byte[] transform(ClassLoader classLoader, String className, Class redefiningClass, ProtectionDomain domain, byte[] bytes) throws IllegalClassFormatException - { - /* - * Use the ASM class reader to see which classes support - * the Suspendable annotation. If they do then those - * classes need to have their bytecodes transformed for - * Continuation support. - */ - ClassReader classReader = new ClassReader(bytes); - ClassNode classNode = new ClassNode(); - classReader.accept(classNode, true); - List annotationNodes = classNode.visibleAnnotations; - - for( AnnotationNode annotationNode : annotationNodes ) - { - if (annotationNode.desc.contains(ContinuationClassTransformer.targetAnnotation_)) - { - bytes = transformer_.transform(bytes); - } - } - return bytes; - } -} diff --git a/src/java/org/apache/cassandra/continuations/Suspendable.java b/src/java/org/apache/cassandra/continuations/Suspendable.java deleted file mode 100644 index 566cb8a974..0000000000 --- a/src/java/org/apache/cassandra/continuations/Suspendable.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * 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. - */ - -package org.apache.cassandra.continuations; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) - -/** - * Author : Avinash Lakshman ( alakshman@facebook.com) & Prashant Malik ( pmalik@facebook.com ) - */ - -public @interface Suspendable -{ - -} diff --git a/src/java/org/apache/cassandra/db/IdentityFilter.java b/src/java/org/apache/cassandra/db/IdentityFilter.java index 5d8d1fef08..2656667ff4 100644 --- a/src/java/org/apache/cassandra/db/IdentityFilter.java +++ b/src/java/org/apache/cassandra/db/IdentityFilter.java @@ -1,29 +1,27 @@ -/* -* 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. -*/ +/* +* 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. +*/ package org.apache.cassandra.db; import java.io.DataInputStream; import java.io.IOException; import java.util.Collection; -import org.apache.cassandra.config.DatabaseDescriptor; -import org.apache.cassandra.continuations.Suspendable; import org.apache.cassandra.io.DataInputBuffer; import org.apache.cassandra.io.SSTable; diff --git a/src/java/org/apache/cassandra/io/DataInputBuffer.java b/src/java/org/apache/cassandra/io/DataInputBuffer.java index 790106b443..c1cecadcc0 100644 --- a/src/java/org/apache/cassandra/io/DataInputBuffer.java +++ b/src/java/org/apache/cassandra/io/DataInputBuffer.java @@ -19,10 +19,6 @@ package org.apache.cassandra.io; import java.io.*; -import java.nio.ByteBuffer; -import java.util.Random; - -import org.apache.cassandra.continuations.Suspendable; /** diff --git a/src/java/org/apache/cassandra/io/DataOutputBuffer.java b/src/java/org/apache/cassandra/io/DataOutputBuffer.java index 0c9f6d7a91..d45839b663 100644 --- a/src/java/org/apache/cassandra/io/DataOutputBuffer.java +++ b/src/java/org/apache/cassandra/io/DataOutputBuffer.java @@ -18,13 +18,10 @@ package org.apache.cassandra.io; -import java.io.*; -import java.nio.ByteBuffer; -import java.nio.MappedByteBuffer; -import java.nio.channels.FileChannel; -import java.util.Arrays; - -import org.apache.cassandra.continuations.Suspendable; +import java.io.ByteArrayOutputStream; +import java.io.DataInput; +import java.io.DataOutputStream; +import java.io.IOException; /** diff --git a/src/java/org/apache/cassandra/net/MessageDeliveryTask.java b/src/java/org/apache/cassandra/net/MessageDeliveryTask.java index b76ad64e05..b8d16be155 100644 --- a/src/java/org/apache/cassandra/net/MessageDeliveryTask.java +++ b/src/java/org/apache/cassandra/net/MessageDeliveryTask.java @@ -18,8 +18,6 @@ package org.apache.cassandra.net; -import org.apache.cassandra.continuations.Suspendable; -import org.apache.cassandra.utils.LogUtil; import org.apache.log4j.Logger; diff --git a/src/java/org/apache/cassandra/test/TestRunner.java b/src/java/org/apache/cassandra/test/TestRunner.java index 57f07950fc..e7317a4188 100644 --- a/src/java/org/apache/cassandra/test/TestRunner.java +++ b/src/java/org/apache/cassandra/test/TestRunner.java @@ -22,7 +22,6 @@ import java.util.Random; import java.util.ArrayList; import java.util.List; -import org.apache.cassandra.continuations.Suspendable; import org.apache.cassandra.db.ColumnFamily; import org.apache.cassandra.db.IColumn; import org.apache.cassandra.db.RowMutation; @@ -236,7 +235,6 @@ public class TestRunner } } -@Suspendable class Scanner implements Runnable { private static final Logger logger_ = Logger.getLogger(Scanner.class);