parent
c02c3f3ed1
commit
94e383d809
|
|
@ -4,7 +4,6 @@ package com.ai.cloud.skywalking.analysis.mapper;
|
|||
import com.ai.cloud.skywalking.analysis.chainbuild.ChainBuildMapper;
|
||||
import com.ai.cloud.skywalking.analysis.chainbuild.ChainBuildReducer;
|
||||
import com.ai.cloud.skywalking.analysis.chainbuild.po.ChainInfo;
|
||||
import com.ai.cloud.skywalking.analysis.chainbuild.po.ChainNode;
|
||||
import com.ai.cloud.skywalking.analysis.config.ConfigInitializer;
|
||||
import com.ai.cloud.skywalking.analysis.config.HBaseTableMetaData;
|
||||
import com.ai.cloud.skywalking.protocol.Span;
|
||||
|
|
@ -16,13 +15,13 @@ import org.apache.hadoop.hbase.TableName;
|
|||
import org.apache.hadoop.hbase.client.*;
|
||||
import org.apache.hadoop.hbase.util.Bytes;
|
||||
import org.apache.hadoop.io.Text;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by astraea on 2016/1/15.
|
||||
|
|
@ -38,8 +37,7 @@ public class CallChainMapperTest {
|
|||
private static Configuration configuration = null;
|
||||
private static Connection connection;
|
||||
|
||||
@Test
|
||||
public void testMap() throws Exception {
|
||||
public static void main(String[] args) throws Exception {
|
||||
ConfigInitializer.initialize();
|
||||
List<Span> spanList = selectByTraceId(chain_Id);
|
||||
ChainInfo chainInfo = ChainBuildMapper.spanToChainInfo(chain_Id, spanList);
|
||||
|
|
@ -89,7 +87,6 @@ public class CallChainMapperTest {
|
|||
}
|
||||
|
||||
|
||||
@Before
|
||||
public void initHBaseClient() throws IOException {
|
||||
if (configuration == null) {
|
||||
configuration = HBaseConfiguration.create();
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
package com.ai.cloud.skywalking.conf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.ai.cloud.skywalking.reciever.conf.Config;
|
||||
import com.ai.cloud.skywalking.reciever.conf.ConfigInitializer;
|
||||
|
||||
public class ConfigInitailizerTest {
|
||||
@Test
|
||||
public void testInitialize2() throws IOException, IllegalAccessException{
|
||||
Properties p = new Properties();
|
||||
InputStream in = ConfigInitializer.class.getResourceAsStream("/config.properties");
|
||||
p.load(in);
|
||||
in.close();
|
||||
|
||||
ConfigInitializer.initialize(p, Config.class);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
package com.ai.cloud.skywalking.reciever.thread;
|
||||
|
||||
import com.ai.cloud.skywalking.reciever.persistance.PersistenceThread;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Created by astraea on 2015/11/5.
|
||||
*/
|
||||
public class PersistenceThreadTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
System.out.println(Integer.valueOf(30 * 1024* 1024));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFile() throws IOException {
|
||||
File file = new File("D:\\test-data\\data\\buffer", "1446801421453-e10f3cc6279d48bebbd03fc3938ad665");
|
||||
FileWriter writer = new FileWriter(file,true);
|
||||
writer.write("ssss");
|
||||
writer.flush();
|
||||
writer.close();
|
||||
System.out.println(FileUtils.deleteQuietly(file));
|
||||
}
|
||||
}
|
||||
|
|
@ -30,7 +30,7 @@ public class SortTest {
|
|||
* @throws IllegalAccessException
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testSelectByTraceId() throws IOException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
|
||||
BuriedPointSDAO sdao = new BuriedPointSDAO();
|
||||
Map<String, TraceLogEntry> bpe = sdao.queryLogByTraceId(Constants.TABLE_NAME_CHAIN,
|
||||
|
|
@ -59,7 +59,7 @@ public class SortTest {
|
|||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testGenTreeMapKey() throws IOException {
|
||||
|
||||
StringBuffer sb = new StringBuffer("0");
|
||||
|
|
@ -101,7 +101,7 @@ public class SortTest {
|
|||
*
|
||||
* @param args
|
||||
*/
|
||||
@Test
|
||||
//@Test
|
||||
public void testSortList() {
|
||||
List<String> StrList = new ArrayList<String>();
|
||||
Random random = new Random(System.currentTimeMillis());
|
||||
|
|
|
|||
Loading…
Reference in New Issue