[강운덕] [LUCYSUS-1744] maven test가 정상적으로 돌아가도록 수정.

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@904 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Woonduk Kang
2012-11-23 02:38:33 +00:00
parent 7c3c82144a
commit 5b18c4822f
3 changed files with 42 additions and 36 deletions
@@ -4,6 +4,7 @@ import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.junit.Ignore;
import org.junit.Test;
import java.io.IOException;
@@ -11,8 +12,9 @@ import java.io.IOException;
/**
*
*/
@Ignore
public class TestSuite {
@Test
// @Test
public void insertData() throws IOException, InterruptedException {
@@ -12,55 +12,57 @@ import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import com.profiler.common.hbase.HBaseClient;
@Ignore
public class FlowChartServiceImplTest {
private static final String TABLE_NAME = "ttt";
private static final String TABLE_NAME = "ttt";
private static HBaseClient client;
private static HBaseClient client;
@BeforeClass
public static void init() {
client = new HBaseClient("localhost", "2181", 2);
Assert.assertNotNull(client);
}
@BeforeClass
public static void init() {
client = new HBaseClient("localhost", "2181", 2);
Assert.assertNotNull(client);
}
@AfterClass
public static void destroy() {
client.close();
}
@AfterClass
public static void destroy() {
client.close();
}
@Test
public void hbase() {
List<Get> gets = new ArrayList<Get>(1);
gets.add(new Get("row1".getBytes()));
@Test
public void hbase() {
List<Get> gets = new ArrayList<Get>(1);
gets.add(new Get("row1".getBytes()));
Result[] results = client.get(TABLE_NAME, gets);
Result[] results = client.get(TABLE_NAME, gets);
for (Result r : results) {
NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> map = r.getMap();
for (Result r : results) {
NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> map = r.getMap();
for (Entry<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> entry : map.entrySet()) {
byte[] family = entry.getKey();
System.out.println("family=" + Bytes.toString(family));
for (Entry<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> entry : map.entrySet()) {
byte[] family = entry.getKey();
System.out.println("family=" + Bytes.toString(family));
NavigableMap<byte[], NavigableMap<Long, byte[]>> values = entry.getValue();
NavigableMap<byte[], NavigableMap<Long, byte[]>> values = entry.getValue();
for (Entry<byte[], NavigableMap<Long, byte[]>> value : values.entrySet()) {
byte[] colname = value.getKey();
System.out.println("colname=" + Bytes.toString(colname));
for (Entry<byte[], NavigableMap<Long, byte[]>> value : values.entrySet()) {
byte[] colname = value.getKey();
System.out.println("colname=" + Bytes.toString(colname));
NavigableMap<Long, byte[]> valueSeries = value.getValue();
NavigableMap<Long, byte[]> valueSeries = value.getValue();
for (Entry<Long, byte[]> v : valueSeries.entrySet()) {
byte[] vv = v.getValue();
System.out.println("value=" + Bytes.toString(vv));
}
}
}
}
}
for (Entry<Long, byte[]> v : valueSeries.entrySet()) {
byte[] vv = v.getValue();
System.out.println("value=" + Bytes.toString(vv));
}
}
}
}
}
}