HTRACE-357. Rename htrace-htraced/go/src/org/apache/htrace to htrace-htraced/go/src/htrace (Colin Patrick McCabe via iwasakims)
diff --git a/htrace-htraced/go/gobuild.sh b/htrace-htraced/go/gobuild.sh
index de9e687..98123be 100755
--- a/htrace-htraced/go/gobuild.sh
+++ b/htrace-htraced/go/gobuild.sh
@@ -132,15 +132,15 @@
# Inject the release and git version into the htraced ldflags.
echo "Building ${RELEASE_VERSION} [${GIT_VERSION}]"
FLAGS="-X main.RELEASE_VERSION ${RELEASE_VERSION} -X main.GIT_VERSION ${GIT_VERSION}"
- go install ${TAGS} -ldflags "${FLAGS}" -v org/apache/htrace/... "$@" \
+ go install ${TAGS} -ldflags "${FLAGS}" -v htrace/... "$@" \
|| die "go install failed."
# Set the RPATH to make bundling leveldb and snappy easier.
set_rpath "${GOBIN}/htraced"
;;
bench)
- go test org/apache/htrace/... ${TAGS} -test.bench=. "$@"
+ go test htrace/... ${TAGS} -test.bench=. "$@"
;;
*)
- go ${ACTION} org/apache/htrace/... ${TAGS} "$@"
+ go ${ACTION} htrace/... ${TAGS} "$@"
;;
esac
diff --git a/htrace-htraced/go/src/org/apache/htrace/client/client.go b/htrace-htraced/go/src/htrace/client/client.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/client/client.go
rename to htrace-htraced/go/src/htrace/client/client.go
index a2a6f8b..81b45d3 100644
--- a/htrace-htraced/go/src/org/apache/htrace/client/client.go
+++ b/htrace-htraced/go/src/htrace/client/client.go
@@ -24,11 +24,11 @@
"encoding/json"
"errors"
"fmt"
+ "htrace/common"
+ "htrace/conf"
"io"
"io/ioutil"
"net/http"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
)
// A golang client for htraced.
@@ -155,7 +155,7 @@
}
func (hcl *Client) writeSpansHttp(spans []*common.Span) error {
- req := common.WriteSpansReq {
+ req := common.WriteSpansReq{
NumSpans: len(spans),
}
var w bytes.Buffer
@@ -165,10 +165,10 @@
return errors.New(fmt.Sprintf("Error serializing WriteSpansReq: %s",
err.Error()))
}
- for spanIdx := range(spans) {
+ for spanIdx := range spans {
err := enc.Encode(spans[spanIdx])
if err != nil {
- return errors.New(fmt.Sprintf("Error serializing span %d out " +
+ return errors.New(fmt.Sprintf("Error serializing span %d out "+
"of %d: %s", spanIdx, len(spans), err.Error()))
}
}
@@ -241,7 +241,7 @@
}
if resp.StatusCode != http.StatusOK {
return nil, resp.StatusCode,
- errors.New(fmt.Sprintf("Error: got bad response status from " +
+ errors.New(fmt.Sprintf("Error: got bad response status from "+
"%s: %s\n%s\n", url, resp.Status, body))
}
return body, 0, nil
diff --git a/htrace-htraced/go/src/org/apache/htrace/client/hclient.go b/htrace-htraced/go/src/htrace/client/hclient.go
similarity index 97%
rename from htrace-htraced/go/src/org/apache/htrace/client/hclient.go
rename to htrace-htraced/go/src/htrace/client/hclient.go
index 43f0c6c..a196f2d 100644
--- a/htrace-htraced/go/src/org/apache/htrace/client/hclient.go
+++ b/htrace-htraced/go/src/htrace/client/hclient.go
@@ -25,10 +25,10 @@
"errors"
"fmt"
"github.com/ugorji/go/codec"
+ "htrace/common"
"io"
"net"
"net/rpc"
- "org/apache/htrace/common"
)
type hClient struct {
@@ -55,7 +55,7 @@
enc := codec.NewEncoder(w, mh)
if methodId == common.METHOD_ID_WRITE_SPANS {
spans := msg.([]*common.Span)
- req := &common.WriteSpansReq {
+ req := &common.WriteSpansReq{
NumSpans: len(spans),
}
err = enc.Encode(req)
@@ -63,7 +63,7 @@
return errors.New(fmt.Sprintf("HrpcClientCodec: Unable to marshal "+
"message as msgpack: %s", err.Error()))
}
- for spanIdx := range(spans) {
+ for spanIdx := range spans {
err = enc.Encode(spans[spanIdx])
if err != nil {
return errors.New(fmt.Sprintf("HrpcClientCodec: Unable to marshal "+
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/log.go b/htrace-htraced/go/src/htrace/common/log.go
similarity index 99%
rename from htrace-htraced/go/src/org/apache/htrace/common/log.go
rename to htrace-htraced/go/src/htrace/common/log.go
index 8cb3953..16c94b4 100644
--- a/htrace-htraced/go/src/org/apache/htrace/common/log.go
+++ b/htrace-htraced/go/src/htrace/common/log.go
@@ -22,8 +22,8 @@
import (
"errors"
"fmt"
+ "htrace/conf"
"log"
- "org/apache/htrace/conf"
"os"
"path/filepath"
"sort"
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/log_test.go b/htrace-htraced/go/src/htrace/common/log_test.go
similarity index 99%
rename from htrace-htraced/go/src/org/apache/htrace/common/log_test.go
rename to htrace-htraced/go/src/htrace/common/log_test.go
index f0b1cde..adb6a57 100644
--- a/htrace-htraced/go/src/org/apache/htrace/common/log_test.go
+++ b/htrace-htraced/go/src/htrace/common/log_test.go
@@ -22,9 +22,9 @@
import (
"bufio"
"fmt"
+ "htrace/conf"
"io"
"io/ioutil"
- "org/apache/htrace/conf"
"os"
"strings"
"testing"
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/process.go b/htrace-htraced/go/src/htrace/common/process.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/common/process.go
rename to htrace-htraced/go/src/htrace/common/process.go
index ce32067..8e2a415 100644
--- a/htrace-htraced/go/src/org/apache/htrace/common/process.go
+++ b/htrace-htraced/go/src/htrace/common/process.go
@@ -22,7 +22,7 @@
import (
"bytes"
"fmt"
- "org/apache/htrace/conf"
+ "htrace/conf"
"os"
"os/signal"
"runtime"
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/process_test.go b/htrace-htraced/go/src/htrace/common/process_test.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/common/process_test.go
rename to htrace-htraced/go/src/htrace/common/process_test.go
index d3f5a56..cbbf613 100644
--- a/htrace-htraced/go/src/org/apache/htrace/common/process_test.go
+++ b/htrace-htraced/go/src/htrace/common/process_test.go
@@ -22,7 +22,7 @@
import (
"bufio"
"fmt"
- "org/apache/htrace/conf"
+ "htrace/conf"
"os"
"os/exec"
"strings"
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/query.go b/htrace-htraced/go/src/htrace/common/query.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/query.go
rename to htrace-htraced/go/src/htrace/common/query.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/query_test.go b/htrace-htraced/go/src/htrace/common/query_test.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/query_test.go
rename to htrace-htraced/go/src/htrace/common/query_test.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/rpc.go b/htrace-htraced/go/src/htrace/common/rpc.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/rpc.go
rename to htrace-htraced/go/src/htrace/common/rpc.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/semaphore.go b/htrace-htraced/go/src/htrace/common/semaphore.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/semaphore.go
rename to htrace-htraced/go/src/htrace/common/semaphore.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/semaphore_test.go b/htrace-htraced/go/src/htrace/common/semaphore_test.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/semaphore_test.go
rename to htrace-htraced/go/src/htrace/common/semaphore_test.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/span.go b/htrace-htraced/go/src/htrace/common/span.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/span.go
rename to htrace-htraced/go/src/htrace/common/span.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/span_test.go b/htrace-htraced/go/src/htrace/common/span_test.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/span_test.go
rename to htrace-htraced/go/src/htrace/common/span_test.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/test_util.go b/htrace-htraced/go/src/htrace/common/test_util.go
similarity index 99%
rename from htrace-htraced/go/src/org/apache/htrace/common/test_util.go
rename to htrace-htraced/go/src/htrace/common/test_util.go
index a761525..740354c 100644
--- a/htrace-htraced/go/src/org/apache/htrace/common/test_util.go
+++ b/htrace-htraced/go/src/htrace/common/test_util.go
@@ -21,8 +21,8 @@
import (
"fmt"
- "testing"
"strings"
+ "testing"
"time"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/time.go b/htrace-htraced/go/src/htrace/common/time.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/time.go
rename to htrace-htraced/go/src/htrace/common/time.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/common/time_test.go b/htrace-htraced/go/src/htrace/common/time_test.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/common/time_test.go
rename to htrace-htraced/go/src/htrace/common/time_test.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/conf/config.go b/htrace-htraced/go/src/htrace/conf/config.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/conf/config.go
rename to htrace-htraced/go/src/htrace/conf/config.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/conf/config_keys.go b/htrace-htraced/go/src/htrace/conf/config_keys.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/conf/config_keys.go
rename to htrace-htraced/go/src/htrace/conf/config_keys.go
index 16790d8..08e2de4 100644
--- a/htrace-htraced/go/src/org/apache/htrace/conf/config_keys.go
+++ b/htrace-htraced/go/src/htrace/conf/config_keys.go
@@ -120,7 +120,7 @@
HTRACE_NUM_HRPC_HANDLERS: "20",
HTRACE_HRPC_IO_TIMEOUT_MS: "60000",
HTRACE_LEVELDB_WRITE_BUFFER_SIZE: "0",
- HTRACE_LEVELDB_CACHE_SIZE: fmt.Sprintf("%d", 100 * 1024 * 1024),
+ HTRACE_LEVELDB_CACHE_SIZE: fmt.Sprintf("%d", 100*1024*1024),
}
// Values to be used when creating test configurations
diff --git a/htrace-htraced/go/src/org/apache/htrace/conf/config_test.go b/htrace-htraced/go/src/htrace/conf/config_test.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/conf/config_test.go
rename to htrace-htraced/go/src/htrace/conf/config_test.go
index a681136..bdab187 100644
--- a/htrace-htraced/go/src/org/apache/htrace/conf/config_test.go
+++ b/htrace-htraced/go/src/htrace/conf/config_test.go
@@ -31,7 +31,7 @@
t.Parallel()
argv := []string{"-Dfoo=bar", "-Dbaz=123", "-DsillyMode", "-Dlog.path="}
bld := &Builder{Argv: argv,
- Defaults:map[string]string {
+ Defaults: map[string]string{
"log.path": "/log/path/default",
}}
cnf, err := bld.Build()
diff --git a/htrace-htraced/go/src/org/apache/htrace/conf/xml.go b/htrace-htraced/go/src/htrace/conf/xml.go
similarity index 100%
rename from htrace-htraced/go/src/org/apache/htrace/conf/xml.go
rename to htrace-htraced/go/src/htrace/conf/xml.go
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/client_test.go b/htrace-htraced/go/src/htrace/htraced/client_test.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/client_test.go
rename to htrace-htraced/go/src/htrace/htraced/client_test.go
index 7b64914..6b50097 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/client_test.go
+++ b/htrace-htraced/go/src/htrace/htraced/client_test.go
@@ -22,12 +22,12 @@
import (
"fmt"
"github.com/ugorji/go/codec"
+ htrace "htrace/client"
+ "htrace/common"
+ "htrace/conf"
+ "htrace/test"
"math"
"math/rand"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "org/apache/htrace/test"
"sort"
"sync"
"sync/atomic"
@@ -389,7 +389,7 @@
func doWriteSpans(name string, N int, maxSpansPerRpc uint32, b *testing.B) {
htraceBld := &MiniHTracedBuilder{Name: "doWriteSpans",
Cnf: map[string]string{
- conf.HTRACE_LOG_LEVEL: "INFO",
+ conf.HTRACE_LOG_LEVEL: "INFO",
conf.HTRACE_NUM_HRPC_HANDLERS: "20",
},
WrittenSpans: common.NewSemaphore(int64(1 - N)),
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/datastore.go b/htrace-htraced/go/src/htrace/htraced/datastore.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/datastore.go
rename to htrace-htraced/go/src/htrace/htraced/datastore.go
index 82fb7b5..26531af 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/datastore.go
+++ b/htrace-htraced/go/src/htrace/htraced/datastore.go
@@ -26,8 +26,8 @@
"fmt"
"github.com/jmhodges/levigo"
"github.com/ugorji/go/codec"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
+ "htrace/common"
+ "htrace/conf"
"strconv"
"strings"
"sync"
@@ -463,25 +463,25 @@
dld.lg.Errorf("Error loading datastore: %s\n", err.Error())
return nil, err
}
- store := &dataStore {
- lg: dld.lg,
- shards: make([]*shard, len(dld.shards)),
- readOpts: dld.readOpts,
- writeOpts: dld.writeOpts,
+ store := &dataStore{
+ lg: dld.lg,
+ shards: make([]*shard, len(dld.shards)),
+ readOpts: dld.readOpts,
+ writeOpts: dld.writeOpts,
WrittenSpans: writtenSpans,
- msink: NewMetricsSink(cnf),
+ msink: NewMetricsSink(cnf),
hb: NewHeartbeater("DatastoreHeartbeater",
cnf.GetInt64(conf.HTRACE_DATASTORE_HEARTBEAT_PERIOD_MS), dld.lg),
- rpr: NewReaper(cnf),
+ rpr: NewReaper(cnf),
startMs: common.TimeToUnixMs(time.Now().UTC()),
}
spanBufferSize := cnf.GetInt(conf.HTRACE_DATA_STORE_SPAN_BUFFER_SIZE)
for shdIdx := range store.shards {
- shd := &shard {
- store: store,
- ldb: dld.shards[shdIdx].ldb,
- path: dld.shards[shdIdx].path,
- incoming: make(chan []*IncomingSpan, spanBufferSize),
+ shd := &shard{
+ store: store,
+ ldb: dld.shards[shdIdx].ldb,
+ path: dld.shards[shdIdx].path,
+ incoming: make(chan []*IncomingSpan, spanBufferSize),
heartbeats: make(chan interface{}, 1),
}
shd.exited.Add(1)
@@ -885,13 +885,13 @@
type satisfiedByReturn int
const (
- NOT_SATISFIED satisfiedByReturn = iota
- NOT_YET_SATISFIED = iota
- SATISFIED = iota
+ NOT_SATISFIED satisfiedByReturn = iota
+ NOT_YET_SATISFIED = iota
+ SATISFIED = iota
)
func (r satisfiedByReturn) String() string {
- switch (r) {
+ switch r {
case NOT_SATISFIED:
return "NOT_SATISFIED"
case NOT_YET_SATISFIED:
@@ -1190,7 +1190,6 @@
}
}
-
func (src *source) next() *common.Span {
for shardIdx := range src.shards {
src.populateNextFromShard(shardIdx)
@@ -1284,7 +1283,7 @@
for {
if len(ret) >= query.Lim {
if lg.DebugEnabled() {
- lg.Debugf("HandleQuery %s: hit query limit after obtaining " +
+ lg.Debugf("HandleQuery %s: hit query limit after obtaining "+
"%d results. %s\n.", query, query.Lim, src.getStats())
}
break // we hit the result size limit
@@ -1292,7 +1291,7 @@
span := src.next()
if span == nil {
if lg.DebugEnabled() {
- lg.Debugf("HandleQuery %s: found %d result(s), which are " +
+ lg.Debugf("HandleQuery %s: found %d result(s), which are "+
"all that exist. %s\n", query, len(ret), src.getStats())
}
break // the source has no more spans to give
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/datastore_test.go b/htrace-htraced/go/src/htrace/htraced/datastore_test.go
similarity index 96%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/datastore_test.go
rename to htrace-htraced/go/src/htrace/htraced/datastore_test.go
index 281ee2d..a7ecead 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/datastore_test.go
+++ b/htrace-htraced/go/src/htrace/htraced/datastore_test.go
@@ -22,11 +22,11 @@
import (
"bytes"
"encoding/json"
+ htrace "htrace/client"
+ "htrace/common"
+ "htrace/conf"
+ "htrace/test"
"math/rand"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "org/apache/htrace/test"
"os"
"reflect"
"sort"
@@ -123,7 +123,7 @@
}
func testQuery(t *testing.T, ht *MiniHTraced, query *common.Query,
- expectedSpans []common.Span) {
+ expectedSpans []common.Span) {
testQueryExt(t, ht, query, expectedSpans, nil)
}
@@ -151,7 +151,7 @@
if expectedNumScanned != nil {
if !reflect.DeepEqual(expectedNumScanned, numScanned) {
t.Fatalf("Invalid values for numScanned: got %v, expected %v\n",
- expectedNumScanned, numScanned)
+ expectedNumScanned, numScanned)
}
}
}
@@ -372,7 +372,7 @@
t.Parallel()
htraceBld := &MiniHTracedBuilder{Name: "TestQueries5",
WrittenSpans: common.NewSemaphore(0),
- DataDirs: make([]string, 1),
+ DataDirs: make([]string, 1),
}
ht, err := htraceBld.Build()
if err != nil {
@@ -458,10 +458,10 @@
}
func verifySuccessfulLoad(t *testing.T, allSpans common.SpanSlice,
- dataDirs []string) {
+ dataDirs []string) {
htraceBld := &MiniHTracedBuilder{
- Name: "TestReloadDataStore#verifySuccessfulLoad",
- DataDirs: dataDirs,
+ Name: "TestReloadDataStore#verifySuccessfulLoad",
+ DataDirs: dataDirs,
KeepDataDirsOnClose: true,
}
ht, err := htraceBld.Build()
@@ -495,8 +495,8 @@
func verifyFailedLoad(t *testing.T, dataDirs []string, expectedErr string) {
htraceBld := &MiniHTracedBuilder{
- Name: "TestReloadDataStore#verifyFailedLoad",
- DataDirs: dataDirs,
+ Name: "TestReloadDataStore#verifyFailedLoad",
+ DataDirs: dataDirs,
KeepDataDirsOnClose: true,
}
_, err := htraceBld.Build()
@@ -612,7 +612,7 @@
dld.shards[0].path, err.Error())
}
newDaemonId = sinfo.DaemonId - 1
- dld.lg.Infof("Read %s from shard %s. Changing daemonId to 0x%016x, " +
+ dld.lg.Infof("Read %s from shard %s. Changing daemonId to 0x%016x, "+
"TotalShards to 3\n.",
asJson(sinfo), dld.shards[0].path, newDaemonId)
sinfo.DaemonId = newDaemonId
@@ -629,13 +629,13 @@
// Open the datastore and modify it to have the wrong LayoutVersion
dld = NewDataStoreLoader(hcnf)
dld.LoadShards()
- for shardIdx := range(dld.shards) {
+ for shardIdx := range dld.shards {
sinfo, err = dld.shards[shardIdx].readShardInfo()
if err != nil {
t.Fatalf("error reading shard info for shard %s: %s\n",
dld.shards[shardIdx].path, err.Error())
}
- dld.lg.Infof("Read %s from shard %s. Changing TotalShards to 2, " +
+ dld.lg.Infof("Read %s from shard %s. Changing TotalShards to 2, "+
"LayoutVersion to 2\n", asJson(sinfo), dld.shards[shardIdx].path)
sinfo.TotalShards = 2
sinfo.LayoutVersion = 2
@@ -647,15 +647,15 @@
}
dld.Close()
dld = nil
- verifyFailedLoad(t, dataDirs, "The layout version of all shards is 2, " +
+ verifyFailedLoad(t, dataDirs, "The layout version of all shards is 2, "+
"but we only support")
// It should work with data.store.clear set.
htraceBld = &MiniHTracedBuilder{
- Name: "TestReloadDataStore#clear",
- DataDirs: dataDirs,
+ Name: "TestReloadDataStore#clear",
+ DataDirs: dataDirs,
KeepDataDirsOnClose: true,
- Cnf: map[string]string{conf.HTRACE_DATA_STORE_CLEAR: "true"},
+ Cnf: map[string]string{conf.HTRACE_DATA_STORE_CLEAR: "true"},
}
ht, err = htraceBld.Build()
if err != nil {
@@ -757,5 +757,5 @@
Lim: 100,
Prev: nil,
}, []common.Span{SIMPLE_TEST_SPANS[0]},
- []int{2, 1})
+ []int{2, 1})
}
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/heartbeater.go b/htrace-htraced/go/src/htrace/htraced/heartbeater.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/heartbeater.go
rename to htrace-htraced/go/src/htrace/htraced/heartbeater.go
index 49a21ee..3f4c951 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/heartbeater.go
+++ b/htrace-htraced/go/src/htrace/htraced/heartbeater.go
@@ -20,7 +20,7 @@
package main
import (
- "org/apache/htrace/common"
+ "htrace/common"
"sync"
"time"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/heartbeater_test.go b/htrace-htraced/go/src/htrace/htraced/heartbeater_test.go
similarity index 97%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/heartbeater_test.go
rename to htrace-htraced/go/src/htrace/htraced/heartbeater_test.go
index cbde7fc..9157965 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/heartbeater_test.go
+++ b/htrace-htraced/go/src/htrace/htraced/heartbeater_test.go
@@ -20,8 +20,8 @@
package main
import (
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
+ "htrace/common"
+ "htrace/conf"
"testing"
"time"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/hrpc.go b/htrace-htraced/go/src/htrace/htraced/hrpc.go
similarity index 97%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/hrpc.go
rename to htrace-htraced/go/src/htrace/htraced/hrpc.go
index ecd13d4..8b5a728 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/hrpc.go
+++ b/htrace-htraced/go/src/htrace/htraced/hrpc.go
@@ -27,11 +27,11 @@
"errors"
"fmt"
"github.com/ugorji/go/codec"
+ "htrace/common"
+ "htrace/conf"
"io"
"net"
"net/rpc"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
"sync"
"sync/atomic"
"time"
@@ -177,7 +177,7 @@
}
if cap(cdc.buf) < int(cdc.length) {
var pow uint
- for pow=0;(1<<pow) < int(cdc.length);pow++ {
+ for pow = 0; (1 << pow) < int(cdc.length); pow++ {
}
cdc.buf = make([]byte, 0, 1<<pow)
}
@@ -213,7 +213,7 @@
var span *common.Span
err := dec.Decode(&span)
if err != nil {
- return newIoErrorWarn(cdc, fmt.Sprintf("Failed to decode span %d " +
+ return newIoErrorWarn(cdc, fmt.Sprintf("Failed to decode span %d "+
"out of %d: %s\n", spanIdx, req.NumSpans, err.Error()))
}
ing.IngestSpan(span)
@@ -287,7 +287,7 @@
}
func (hand *HrpcHandler) WriteSpans(req *common.WriteSpansReq,
- resp *common.WriteSpansResp) (err error) {
+ resp *common.WriteSpansResp) (err error) {
// Nothing to do here; WriteSpans is handled in ReadRequestBody.
return nil
}
@@ -321,7 +321,7 @@
hsv.cdcs <- &HrpcServerCodec{
lg: lg,
hsv: hsv,
- msgpackHandle: codec.MsgpackHandle {
+ msgpackHandle: codec.MsgpackHandle{
WriteExt: true,
},
}
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/htraced.go b/htrace-htraced/go/src/htrace/htraced/htraced.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/htraced.go
rename to htrace-htraced/go/src/htrace/htraced/htraced.go
index 35ee753..0d41e0d 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/htraced.go
+++ b/htrace-htraced/go/src/htrace/htraced/htraced.go
@@ -25,9 +25,9 @@
"fmt"
"github.com/alecthomas/kingpin"
"github.com/jmhodges/levigo"
+ "htrace/common"
+ "htrace/conf"
"net"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
"os"
"runtime"
"time"
@@ -53,7 +53,7 @@
-Dk: set configuration key 'k' to 'true'
Normally, configuration options should be set in the ` + conf.CONFIG_FILE_NAME + `
-configuration file. We find this file by searching the paths in the
+configuration file. We find this file by searching the paths in the
` + conf.HTRACED_CONF_DIR + `. The command-line options are just an alternate way
of setting configuration when launching the daemon.
`
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/loader.go b/htrace-htraced/go/src/htrace/htraced/loader.go
similarity index 89%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/loader.go
rename to htrace-htraced/go/src/htrace/htraced/loader.go
index 5914004..95c5c3e 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/loader.go
+++ b/htrace-htraced/go/src/htrace/htraced/loader.go
@@ -25,11 +25,11 @@
"fmt"
"github.com/jmhodges/levigo"
"github.com/ugorji/go/codec"
+ "htrace/common"
+ "htrace/conf"
"io"
"math"
"math/rand"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
"os"
"strings"
"syscall"
@@ -86,11 +86,11 @@
ShardIndex uint32
}
-// Create a new datastore loader.
+// Create a new datastore loader.
// Initializes the loader, but does not load any leveldb instances.
func NewDataStoreLoader(cnf *conf.Config) *DataStoreLoader {
dld := &DataStoreLoader{
- lg: common.NewLogger("datastore", cnf),
+ lg: common.NewLogger("datastore", cnf),
ClearStored: cnf.GetBool(conf.HTRACE_DATA_STORE_CLEAR),
}
dld.readOpts = levigo.NewReadOptions()
@@ -102,15 +102,15 @@
rdirs := strings.Split(dirsStr, conf.PATH_LIST_SEP)
// Filter out empty entries
dirs := make([]string, 0, len(rdirs))
- for i := range(rdirs) {
+ for i := range rdirs {
if strings.TrimSpace(rdirs[i]) != "" {
dirs = append(dirs, rdirs[i])
}
}
dld.shards = make([]*ShardLoader, len(dirs))
- for i := range(dirs) {
+ for i := range dirs {
dld.shards[i] = &ShardLoader{
- dld: dld,
+ dld: dld,
path: dirs[i] + conf.PATH_SEP + "db",
}
}
@@ -147,7 +147,7 @@
dld.writeOpts = nil
}
if dld.shards != nil {
- for i := range(dld.shards) {
+ for i := range dld.shards {
if dld.shards[i] != nil {
dld.shards[i].Close()
}
@@ -175,7 +175,7 @@
var rlim syscall.Rlimit
err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim)
if err != nil {
- dld.lg.Warnf("Unable to calculate maximum open files per shard: " +
+ dld.lg.Warnf("Unable to calculate maximum open files per shard: "+
"getrlimit failed: %s\n", err.Error())
return 0
}
@@ -195,10 +195,10 @@
}
fdsPerShard := (maxFd - NON_DATASTORE_FD_MAX) / len(dld.shards)
if fdsPerShard < MIN_FDS_PER_SHARD {
- dld.lg.Warnf("Expected to be able to use at least %d " +
- "fds per shard, but we have %d shards and %d total fds to allocate, " +
+ dld.lg.Warnf("Expected to be able to use at least %d "+
+ "fds per shard, but we have %d shards and %d total fds to allocate, "+
"giving us only %d FDs per shard.", MIN_FDS_PER_SHARD,
- len(dld.shards), maxFd - NON_DATASTORE_FD_MAX, fdsPerShard)
+ len(dld.shards), maxFd-NON_DATASTORE_FD_MAX, fdsPerShard)
return 0
}
dld.lg.Infof("maxFd = %d. Setting maxFdPerShard = %d\n",
@@ -208,7 +208,7 @@
// Load information about all shards.
func (dld *DataStoreLoader) LoadShards() {
- for i := range(dld.shards) {
+ for i := range dld.shards {
shd := dld.shards[i]
shd.load()
}
@@ -221,7 +221,7 @@
return errors.New("No shard directories found.")
}
// Make sure no shards had errors.
- for i := range(dld.shards) {
+ for i := range dld.shards {
shd := dld.shards[i]
if shd.infoErr != nil {
return shd.infoErr
@@ -230,16 +230,16 @@
// Make sure that if any shards are empty, all shards are empty.
emptyShards := ""
prefix := ""
- for i := range(dld.shards) {
+ for i := range dld.shards {
if dld.shards[i].info == nil {
emptyShards = prefix + dld.shards[i].path
prefix = ", "
}
}
if emptyShards != "" {
- for i := range(dld.shards) {
+ for i := range dld.shards {
if dld.shards[i].info != nil {
- return errors.New(fmt.Sprintf("Shards %s were empty, but " +
+ return errors.New(fmt.Sprintf("Shards %s were empty, but "+
"the other shards had data.", emptyShards))
}
}
@@ -254,34 +254,34 @@
for i := 1; i < len(dld.shards); i++ {
shd := dld.shards[i]
if layoutVersion != shd.info.LayoutVersion {
- return errors.New(fmt.Sprintf("Layout version mismatch. Shard " +
- "%s has layout version 0x%016x, but shard %s has layout " +
+ return errors.New(fmt.Sprintf("Layout version mismatch. Shard "+
+ "%s has layout version 0x%016x, but shard %s has layout "+
"version 0x%016x.",
dld.shards[0].path, layoutVersion, shd.path, shd.info.LayoutVersion))
}
if daemonId != shd.info.DaemonId {
- return errors.New(fmt.Sprintf("DaemonId mismatch. Shard %s has " +
- "daemonId 0x%016x, but shard %s has daemonId 0x%016x.",
+ return errors.New(fmt.Sprintf("DaemonId mismatch. Shard %s has "+
+ "daemonId 0x%016x, but shard %s has daemonId 0x%016x.",
dld.shards[0].path, daemonId, shd.path, shd.info.DaemonId))
}
if totalShards != shd.info.TotalShards {
- return errors.New(fmt.Sprintf("TotalShards mismatch. Shard %s has " +
+ return errors.New(fmt.Sprintf("TotalShards mismatch. Shard %s has "+
"TotalShards = %d, but shard %s has TotalShards = %d.",
dld.shards[0].path, totalShards, shd.path, shd.info.TotalShards))
}
if shd.info.ShardIndex >= totalShards {
- return errors.New(fmt.Sprintf("Invalid ShardIndex. Shard %s has " +
+ return errors.New(fmt.Sprintf("Invalid ShardIndex. Shard %s has "+
"ShardIndex = %d, but TotalShards = %d.",
shd.path, shd.info.ShardIndex, shd.info.TotalShards))
}
}
if layoutVersion != CURRENT_LAYOUT_VERSION {
- return errors.New(fmt.Sprintf("The layout version of all shards " +
+ return errors.New(fmt.Sprintf("The layout version of all shards "+
"is %d, but we only support version %d.",
layoutVersion, CURRENT_LAYOUT_VERSION))
}
if totalShards != uint32(len(dld.shards)) {
- return errors.New(fmt.Sprintf("The TotalShards field of all shards " +
+ return errors.New(fmt.Sprintf("The TotalShards field of all shards "+
"is %d, but we have %d shards.", totalShards, len(dld.shards)))
}
// Reorder shards in order of their ShardIndex.
@@ -290,7 +290,7 @@
shd := dld.shards[i]
shardIdx := shd.info.ShardIndex
if reorderedShards[shardIdx] != nil {
- return errors.New(fmt.Sprintf("Both shard %s and " +
+ return errors.New(fmt.Sprintf("Both shard %s and "+
"shard %s have ShardIndex %d.", shd.path,
reorderedShards[shardIdx].path, shardIdx))
}
@@ -309,7 +309,7 @@
return err
}
}
- // Make sure the shard directories exist in all cases, with a mkdir -p
+ // Make sure the shard directories exist in all cases, with a mkdir -p
for i := range dld.shards {
err := os.MkdirAll(dld.shards[i].path, 0777)
if err != nil {
@@ -324,32 +324,32 @@
return err
}
if dld.shards[0].ldb != nil {
- dld.lg.Infof("Loaded %d leveldb instances with " +
+ dld.lg.Infof("Loaded %d leveldb instances with "+
"DaemonId of 0x%016x\n", len(dld.shards),
dld.shards[0].info.DaemonId)
} else {
// Create leveldb instances if needed.
rnd := rand.New(rand.NewSource(time.Now().UnixNano()))
daemonId := uint64(rnd.Int63())
- dld.lg.Infof("Initializing %d leveldb instances with a new " +
+ dld.lg.Infof("Initializing %d leveldb instances with a new "+
"DaemonId of 0x%016x\n", len(dld.shards), daemonId)
dld.openOpts.SetCreateIfMissing(true)
- for i := range(dld.shards) {
+ for i := range dld.shards {
shd := dld.shards[i]
shd.ldb, err = levigo.Open(shd.path, shd.dld.openOpts)
if err != nil {
- return errors.New(fmt.Sprintf("levigo.Open(%s) failed to " +
+ return errors.New(fmt.Sprintf("levigo.Open(%s) failed to "+
"create the shard: %s", shd.path, err.Error()))
}
- info := &ShardInfo {
+ info := &ShardInfo{
LayoutVersion: CURRENT_LAYOUT_VERSION,
- DaemonId: daemonId,
- TotalShards: uint32(len(dld.shards)),
- ShardIndex: uint32(i),
+ DaemonId: daemonId,
+ TotalShards: uint32(len(dld.shards)),
+ ShardIndex: uint32(i),
}
err = shd.writeShardInfo(info)
if err != nil {
- return errors.New(fmt.Sprintf("levigo.Open(%s) failed to " +
+ return errors.New(fmt.Sprintf("levigo.Open(%s) failed to "+
"write shard info: %s", shd.path, err.Error()))
}
dld.lg.Infof("Shard %s initialized with ShardInfo %s \n",
@@ -414,13 +414,13 @@
return
}
shd.infoErr = errors.New(fmt.Sprintf(
- "stat() error on leveldb directory " +
+ "stat() error on leveldb directory "+
"%s: %s", shd.path, err.Error()))
return
}
if !fi.Mode().IsDir() {
shd.infoErr = errors.New(fmt.Sprintf(
- "stat() error on leveldb directory " +
+ "stat() error on leveldb directory "+
"%s: inode is not directory.", shd.path))
return
}
@@ -428,7 +428,7 @@
dbDir, err = os.Open(shd.path)
if err != nil {
shd.infoErr = errors.New(fmt.Sprintf(
- "open() error on leveldb directory " +
+ "open() error on leveldb directory "+
"%s: %s.", shd.path, err.Error()))
return
}
@@ -445,7 +445,7 @@
return
}
shd.infoErr = errors.New(fmt.Sprintf(
- "Readdirnames() error on leveldb directory " +
+ "Readdirnames() error on leveldb directory "+
"%s: %s.", shd.path, err.Error()))
return
}
@@ -455,7 +455,7 @@
if err != nil {
shd.ldb = nil
shd.infoErr = errors.New(fmt.Sprintf(
- "levigo.Open() error on leveldb directory " +
+ "levigo.Open() error on leveldb directory "+
"%s: %s.", shd.path, err.Error()))
return
}
@@ -470,23 +470,23 @@
func (shd *ShardLoader) readShardInfo() (*ShardInfo, error) {
buf, err := shd.ldb.Get(shd.dld.readOpts, []byte{SHARD_INFO_KEY})
if err != nil {
- return nil, errors.New(fmt.Sprintf("readShardInfo(%s): failed to " +
+ return nil, errors.New(fmt.Sprintf("readShardInfo(%s): failed to "+
"read shard info key: %s", shd.path, err.Error()))
}
if len(buf) == 0 {
- return nil, errors.New(fmt.Sprintf("readShardInfo(%s): got zero-" +
+ return nil, errors.New(fmt.Sprintf("readShardInfo(%s): got zero-"+
"length value for shard info key.", shd.path))
}
mh := new(codec.MsgpackHandle)
mh.WriteExt = true
r := bytes.NewBuffer(buf)
decoder := codec.NewDecoder(r, mh)
- shardInfo := &ShardInfo {
+ shardInfo := &ShardInfo{
LayoutVersion: UNKNOWN_LAYOUT_VERSION,
}
err = decoder.Decode(shardInfo)
if err != nil {
- return nil, errors.New(fmt.Sprintf("readShardInfo(%s): msgpack " +
+ return nil, errors.New(fmt.Sprintf("readShardInfo(%s): msgpack "+
"decoding failed for shard info key: %s", shd.path, err.Error()))
}
return shardInfo, nil
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/metrics.go b/htrace-htraced/go/src/htrace/htraced/metrics.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/metrics.go
rename to htrace-htraced/go/src/htrace/htraced/metrics.go
index 9176de0..d2feca8 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/metrics.go
+++ b/htrace-htraced/go/src/htrace/htraced/metrics.go
@@ -20,9 +20,9 @@
package main
import (
+ "htrace/common"
+ "htrace/conf"
"math"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
"sync"
"time"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/metrics_test.go b/htrace-htraced/go/src/htrace/htraced/metrics_test.go
similarity index 97%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/metrics_test.go
rename to htrace-htraced/go/src/htrace/htraced/metrics_test.go
index 6daf640..4f27ffd 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/metrics_test.go
+++ b/htrace-htraced/go/src/htrace/htraced/metrics_test.go
@@ -21,9 +21,9 @@
import (
"fmt"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
+ htrace "htrace/client"
+ "htrace/common"
+ "htrace/conf"
"reflect"
"testing"
"time"
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/mini_htraced.go b/htrace-htraced/go/src/htrace/htraced/mini_htraced.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/mini_htraced.go
rename to htrace-htraced/go/src/htrace/htraced/mini_htraced.go
index cf7ef67..af8d379 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/mini_htraced.go
+++ b/htrace-htraced/go/src/htrace/htraced/mini_htraced.go
@@ -21,10 +21,10 @@
import (
"fmt"
+ "htrace/common"
+ "htrace/conf"
"io/ioutil"
"net"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
"os"
"strings"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/reaper_test.go b/htrace-htraced/go/src/htrace/htraced/reaper_test.go
similarity index 96%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/reaper_test.go
rename to htrace-htraced/go/src/htrace/htraced/reaper_test.go
index 2d6a76f..af11e38 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/reaper_test.go
+++ b/htrace-htraced/go/src/htrace/htraced/reaper_test.go
@@ -21,10 +21,10 @@
import (
"fmt"
+ "htrace/common"
+ "htrace/conf"
+ "htrace/test"
"math/rand"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
- "org/apache/htrace/test"
"testing"
"time"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htraced/rest.go b/htrace-htraced/go/src/htrace/htraced/rest.go
similarity index 99%
rename from htrace-htraced/go/src/org/apache/htrace/htraced/rest.go
rename to htrace-htraced/go/src/htrace/htraced/rest.go
index eabeee7..1ba4791 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htraced/rest.go
+++ b/htrace-htraced/go/src/htrace/htraced/rest.go
@@ -24,10 +24,10 @@
"encoding/json"
"fmt"
"github.com/gorilla/mux"
+ "htrace/common"
+ "htrace/conf"
"net"
"net/http"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
"os"
"path/filepath"
"strconv"
@@ -231,7 +231,7 @@
dec := json.NewDecoder(req.Body)
var msg common.WriteSpansReq
err := dec.Decode(&msg)
- if (err != nil) {
+ if err != nil {
writeError(hand.lg, w, http.StatusBadRequest,
fmt.Sprintf("Error parsing WriteSpansReq: %s", err.Error()))
return
diff --git a/htrace-htraced/go/src/org/apache/htrace/htracedTool/cmd.go b/htrace-htraced/go/src/htrace/htracedTool/cmd.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htracedTool/cmd.go
rename to htrace-htraced/go/src/htrace/htracedTool/cmd.go
index 2eff0a8..65b67e5 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htracedTool/cmd.go
+++ b/htrace-htraced/go/src/htrace/htracedTool/cmd.go
@@ -26,10 +26,10 @@
"errors"
"fmt"
"github.com/alecthomas/kingpin"
+ htrace "htrace/client"
+ "htrace/common"
+ "htrace/conf"
"io"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
"os"
"sort"
"strings"
@@ -49,7 +49,7 @@
other data on a running htraced daemon.
If we find an ` + conf.CONFIG_FILE_NAME + ` configuration file in the list of directories
-specified in ` + conf.HTRACED_CONF_DIR + `, we will use that configuration; otherwise,
+specified in ` + conf.HTRACED_CONF_DIR + `, we will use that configuration; otherwise,
the defaults will be used.
`
diff --git a/htrace-htraced/go/src/org/apache/htrace/htracedTool/file.go b/htrace-htraced/go/src/htrace/htracedTool/file.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htracedTool/file.go
rename to htrace-htraced/go/src/htrace/htracedTool/file.go
index ea214be..ca9c18d 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htracedTool/file.go
+++ b/htrace-htraced/go/src/htrace/htracedTool/file.go
@@ -24,8 +24,8 @@
"encoding/json"
"errors"
"fmt"
+ "htrace/common"
"io"
- "org/apache/htrace/common"
"os"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htracedTool/file_test.go b/htrace-htraced/go/src/htrace/htracedTool/file_test.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htracedTool/file_test.go
rename to htrace-htraced/go/src/htrace/htracedTool/file_test.go
index 98e5e6c..f955add 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htracedTool/file_test.go
+++ b/htrace-htraced/go/src/htrace/htracedTool/file_test.go
@@ -21,10 +21,10 @@
import (
"errors"
+ "htrace/common"
+ "htrace/conf"
"io"
"io/ioutil"
- "org/apache/htrace/common"
- "org/apache/htrace/conf"
"os"
"strings"
"testing"
diff --git a/htrace-htraced/go/src/org/apache/htrace/htracedTool/graph.go b/htrace-htraced/go/src/htrace/htracedTool/graph.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htracedTool/graph.go
rename to htrace-htraced/go/src/htrace/htracedTool/graph.go
index 024d973..b238f11 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htracedTool/graph.go
+++ b/htrace-htraced/go/src/htrace/htracedTool/graph.go
@@ -23,8 +23,8 @@
"bufio"
"errors"
"fmt"
+ "htrace/common"
"io"
- "org/apache/htrace/common"
"os"
"sort"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htracedTool/graph_test.go b/htrace-htraced/go/src/htrace/htracedTool/graph_test.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htracedTool/graph_test.go
rename to htrace-htraced/go/src/htrace/htracedTool/graph_test.go
index 621b3dc..af6d262 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htracedTool/graph_test.go
+++ b/htrace-htraced/go/src/htrace/htracedTool/graph_test.go
@@ -21,7 +21,7 @@
import (
"bytes"
- "org/apache/htrace/common"
+ "htrace/common"
"testing"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htracedTool/queries.go b/htrace-htraced/go/src/htrace/htracedTool/queries.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htracedTool/queries.go
rename to htrace-htraced/go/src/htrace/htracedTool/queries.go
index 1e6f51f..3111c62 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htracedTool/queries.go
+++ b/htrace-htraced/go/src/htrace/htracedTool/queries.go
@@ -23,8 +23,8 @@
"encoding/json"
"errors"
"fmt"
- htrace "org/apache/htrace/client"
- "org/apache/htrace/common"
+ htrace "htrace/client"
+ "htrace/common"
"strings"
"unicode"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/htracedTool/query_test.go b/htrace-htraced/go/src/htrace/htracedTool/query_test.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/htracedTool/query_test.go
rename to htrace-htraced/go/src/htrace/htracedTool/query_test.go
index 755d0b0..55aff91 100644
--- a/htrace-htraced/go/src/org/apache/htrace/htracedTool/query_test.go
+++ b/htrace-htraced/go/src/htrace/htracedTool/query_test.go
@@ -21,7 +21,7 @@
import (
"encoding/json"
- "org/apache/htrace/common"
+ "htrace/common"
"reflect"
"testing"
)
diff --git a/htrace-htraced/go/src/org/apache/htrace/test/random.go b/htrace-htraced/go/src/htrace/test/random.go
similarity index 98%
rename from htrace-htraced/go/src/org/apache/htrace/test/random.go
rename to htrace-htraced/go/src/htrace/test/random.go
index 540ea14..ad3104c 100644
--- a/htrace-htraced/go/src/org/apache/htrace/test/random.go
+++ b/htrace-htraced/go/src/htrace/test/random.go
@@ -21,8 +21,8 @@
import (
"fmt"
+ "htrace/common"
"math/rand"
- "org/apache/htrace/common"
)
func NonZeroRand64(rnd *rand.Rand) int64 {