@@ -0,0 +1,2298 @@
+package com.a.eye.skywalking.storage.data.index;%0A%0Aimport com.a.eye.skywalking.network.grpc.RequestSpan;%0Aimport com.a.eye.skywalking.network.grpc.TraceId;%0Aimport com.a.eye.skywalking.storage.data.file.DataFileNameDesc;%0Aimport com.a.eye.skywalking.storage.data.spandata.RequestSpanData;%0Aimport com.a.eye.skywalking.storage.util.NetUtils;%0Aimport org.elasticsearch.client.transport.TransportClient;%0Aimport org.elasticsearch.common.settings.Settings;%0Aimport org.elasticsearch.common.transport.InetSocketTransportAddress;%0Aimport org.elasticsearch.transport.client.PreBuiltTransportClient;%0A%0Aimport java.net.InetAddress;%0Aimport java.net.UnknownHostException;%0A%0A/**%0A * Created by wusheng on 2016/11/30.%0A */%0Apublic class IndexOperatorTest %7B%0A    public static void main(String%5B%5D args) %7B%0A        try %7B%0A            TransportClient client = new PreBuiltTransportClient(Settings.EMPTY).addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(%22test_es%22), 9300));%0A            IndexOperator operator = new IndexOperator(client);%0A%0A            for (int i = 0; i %3C 1_000_000_000; i++) %7B%0A                IndexMetaCollection collection = new IndexMetaCollection();%0A                for (int j = 0; j %3C 100; j++) %7B%0A                    RequestSpan requestSpan =%0A                            RequestSpan.newBuilder().setSpanType(1).setAddress(NetUtils.getLocalAddress().toString()).setApplicationId(%221%22).setCallType(%221%22).setLevelId(0)%0A                                    .setProcessNo(19287).setStartDate(System.currentTimeMillis()).setTraceId(%0A                                    TraceId.newBuilder().addSegments(201611).addSegments(j).addSegments(8504828).addSegments(2277).addSegments(53).addSegments(3).build())%0A                                    .setUserId(%221%22).setViewPointId(%22http://localhost:8080/wwww/test/helloWorld%22).setRouteKey(i).build();%0A                    IndexMetaInfo info = new IndexMetaInfo(new RequestSpanData(requestSpan), new DataFileNameDesc(), i, j);%0A                    collection.add(info);%0A                %7D%0A%0A                operator.batchUpdate(collection);%0A%0A                if (i %25 100 == 0) %7B%0A                    System.out.println(%22 num=%22 + i + %22 %22);%0A                %7D%0A            %7D%0A        %7D catch (UnknownHostException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%7D%0A

Add a IndexOperatorTest.