提交 8eb0d6f2 编写于 作者: K ken.lj

Remove useless dependencies

上级 c7cd8899
......@@ -78,10 +78,7 @@
<mina_version>1.1.7</mina_version>
<grizzly_version>2.1.4</grizzly_version>
<httpclient_version>4.5.3</httpclient_version>
<xstream_version>1.4.1</xstream_version>
<fastjson_version>1.2.31</fastjson_version>
<bsf_version>3.1</bsf_version>
<sorcerer_version>0.8</sorcerer_version>
<zookeeper_version>3.4.9</zookeeper_version>
<zkclient_version>0.2</zkclient_version>
<curator_version>2.12.0</curator_version>
......@@ -156,21 +153,6 @@
<artifactId>fastjson</artifactId>
<version>${fastjson_version}</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${xstream_version}</version>
</dependency>
<dependency>
<groupId>org.apache.bsf</groupId>
<artifactId>bsf-api</artifactId>
<version>${bsf_version}</version>
</dependency>
<dependency>
<groupId>org.jvnet.sorcerer</groupId>
<artifactId>sorcerer-javac</artifactId>
<version>${sorcerer_version}</version>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
......
......@@ -35,9 +35,5 @@
<artifactId>dubbo-rpc-api</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.bsf</groupId>
<artifactId>bsf-api</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -69,9 +69,5 @@ limitations under the License.
<groupId>de.ruedigermoeller</groupId>
<artifactId>fst</artifactId>
</dependency>
<dependency>
<groupId>org.jvnet.sorcerer</groupId>
<artifactId>sorcerer-javac</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
......@@ -54,10 +54,5 @@
<version>${project.parent.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.bsf</groupId>
<artifactId>bsf-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
/*
* 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 com.dubbo.serialize.benchmark;
import com.alibaba.dubbo.common.io.UnsafeByteArrayOutputStream;
import com.alibaba.dubbo.common.serialize.support.dubbo.GenericObjectInput;
import com.alibaba.dubbo.common.serialize.support.dubbo.GenericObjectOutput;
import data.media.MediaContent;
import java.io.ByteArrayInputStream;
import java.io.IOException;
/**
* Dubbo Seriazition Benchmark
*/
public class Dubbo {
public static Serializer<Object> GenericSerializer = new Serializer<Object>() {
public Object deserialize(byte[] array) throws Exception {
GenericObjectInput objectInput = new GenericObjectInput(new ByteArrayInputStream(array));
return objectInput.readObject();
}
public byte[] serialize(Object data) throws java.io.IOException {
UnsafeByteArrayOutputStream os = new UnsafeByteArrayOutputStream(10240);
GenericObjectOutput objectOutput = new GenericObjectOutput(os);
objectOutput.writeObject(data);
objectOutput.flushBuffer();
return os.toByteArray();
}
public String getName() {
return "dubbo";
}
};
public static void register(TestGroups groups) {
groups.media.add(JavaBuiltIn.MediaTransformer, Dubbo.<MediaContent>GenericSerializer());
}
// ------------------------------------------------------------
// Serializer (just one)
public static <T> Serializer<T> GenericSerializer() {
@SuppressWarnings("unchecked")
Serializer<T> s = (Serializer<T>) GenericSerializer;
return s;
}
}
/*
* 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 com.jingdong.client;
import com.alibaba.dubbo.rpc.benchmark.AbstractClientRunnable;
import com.alibaba.dubbo.rpc.benchmark.DemoService;
import com.alibaba.dubbo.rpc.benchmark.ServiceFactory;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
/**
* DemoBenchmarkClient.java
*/
public class DemoBenchmarkClientRunnable extends AbstractClientRunnable {
public DemoBenchmarkClientRunnable(String targetIP, int targetPort, int clientNums, int rpcTimeout,
CyclicBarrier barrier, CountDownLatch latch, long startTime,
long endTime) {
super(targetIP, targetPort, clientNums, rpcTimeout, barrier, latch, startTime, endTime);
}
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public Object invoke(ServiceFactory serviceFactory) {
DemoService demoService = (DemoService) serviceFactory.get(DemoService.class);
return demoService.sendRequest("hello");
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册