Add everything back into one project hood, still missing iodine

master
Harshavardhana 10 years ago
parent 60b30bdd0a
commit 7fd1cc073c
  1. 12
      Godeps/Godeps.json
  2. 30
      Godeps/_workspace/src/github.com/minio-io/donut/Godeps/Godeps.json
  3. 5
      Godeps/_workspace/src/github.com/minio-io/donut/Godeps/Readme
  4. 69
      Godeps/_workspace/src/github.com/minio-io/donut/Makefile
  5. 201
      Godeps/_workspace/src/github.com/minio-io/donut/buildscripts/checkdeps.sh
  6. 18
      Godeps/_workspace/src/github.com/minio-io/donut/buildscripts/git-commit-id.sh
  7. 6
      Godeps/_workspace/src/github.com/minio-io/erasure/.gitignore
  8. 19
      Godeps/_workspace/src/github.com/minio-io/iodine/iodine.go
  9. 8
      Godeps/_workspace/src/github.com/minio-io/iodine/iodine_test.go
  10. 1
      Makefile
  11. 1
      pkg/erasure/.gitignore
  12. 0
      pkg/erasure/BUILDDEPS.md
  13. 0
      pkg/erasure/CONTRIBUTING.md
  14. 0
      pkg/erasure/LICENSE.INTEL
  15. 0
      pkg/erasure/LICENSE.MINIO
  16. 0
      pkg/erasure/README.md
  17. 0
      pkg/erasure/RELEASE-NOTES.INTEL
  18. 0
      pkg/erasure/RELEASE-NOTES.MINIO
  19. 0
      pkg/erasure/cauchy_test.go
  20. 0
      pkg/erasure/ctypes.go
  21. 0
      pkg/erasure/doc.go
  22. 0
      pkg/erasure/docs/isa-l_open_src_2.10.pdf
  23. 0
      pkg/erasure/docs/isa-l_open_src_2.13.pdf
  24. 0
      pkg/erasure/ec_base.c
  25. 0
      pkg/erasure/ec_base.h
  26. 0
      pkg/erasure/ec_code.h
  27. 0
      pkg/erasure/ec_highlevel_func.c
  28. 0
      pkg/erasure/ec_isal-l.h
  29. 0
      pkg/erasure/ec_minio_common.h
  30. 0
      pkg/erasure/ec_minio_decode.c
  31. 0
      pkg/erasure/ec_minio_encode.c
  32. 0
      pkg/erasure/ec_multibinary.asm
  33. 0
      pkg/erasure/ec_reg_sizes.asm
  34. 0
      pkg/erasure/ec_types.h
  35. 0
      pkg/erasure/erasure_decode.go
  36. 0
      pkg/erasure/erasure_encode.go
  37. 0
      pkg/erasure/erasure_yasm_darwin.go
  38. 0
      pkg/erasure/erasure_yasm_linux.go
  39. 0
      pkg/erasure/erasure_yasm_windows.go
  40. 0
      pkg/erasure/gf_2vect_dot_prod_avx.asm
  41. 0
      pkg/erasure/gf_2vect_dot_prod_avx2.asm
  42. 0
      pkg/erasure/gf_2vect_dot_prod_sse.asm
  43. 0
      pkg/erasure/gf_2vect_mad_avx.asm
  44. 0
      pkg/erasure/gf_2vect_mad_avx2.asm
  45. 0
      pkg/erasure/gf_2vect_mad_sse.asm
  46. 0
      pkg/erasure/gf_3vect_dot_prod_avx.asm
  47. 0
      pkg/erasure/gf_3vect_dot_prod_avx2.asm
  48. 0
      pkg/erasure/gf_3vect_dot_prod_sse.asm
  49. 0
      pkg/erasure/gf_3vect_mad_avx.asm
  50. 0
      pkg/erasure/gf_3vect_mad_avx2.asm
  51. 0
      pkg/erasure/gf_3vect_mad_sse.asm
  52. 0
      pkg/erasure/gf_4vect_dot_prod_avx.asm
  53. 0
      pkg/erasure/gf_4vect_dot_prod_avx2.asm
  54. 0
      pkg/erasure/gf_4vect_dot_prod_sse.asm
  55. 0
      pkg/erasure/gf_4vect_mad_avx.asm
  56. 0
      pkg/erasure/gf_4vect_mad_avx2.asm
  57. 0
      pkg/erasure/gf_4vect_mad_sse.asm
  58. 0
      pkg/erasure/gf_5vect_dot_prod_avx.asm
  59. 0
      pkg/erasure/gf_5vect_dot_prod_avx2.asm
  60. 0
      pkg/erasure/gf_5vect_dot_prod_sse.asm
  61. 0
      pkg/erasure/gf_5vect_mad_avx.asm
  62. 0
      pkg/erasure/gf_5vect_mad_avx2.asm
  63. 0
      pkg/erasure/gf_5vect_mad_sse.asm
  64. 0
      pkg/erasure/gf_6vect_dot_prod_avx.asm
  65. 0
      pkg/erasure/gf_6vect_dot_prod_avx2.asm
  66. 0
      pkg/erasure/gf_6vect_dot_prod_sse.asm
  67. 0
      pkg/erasure/gf_6vect_mad_avx.asm
  68. 0
      pkg/erasure/gf_6vect_mad_avx2.asm
  69. 0
      pkg/erasure/gf_6vect_mad_sse.asm
  70. 0
      pkg/erasure/gf_vect_dot_prod_avx.asm
  71. 0
      pkg/erasure/gf_vect_dot_prod_avx2.asm
  72. 0
      pkg/erasure/gf_vect_dot_prod_sse.asm
  73. 0
      pkg/erasure/gf_vect_mad_avx.asm
  74. 0
      pkg/erasure/gf_vect_mad_avx2.asm
  75. 0
      pkg/erasure/gf_vect_mad_sse.asm
  76. 0
      pkg/erasure/gf_vect_mul.h
  77. 0
      pkg/erasure/gf_vect_mul_avx.asm
  78. 0
      pkg/erasure/gf_vect_mul_sse.asm
  79. 0
      pkg/erasure/stdint.go
  80. 0
      pkg/erasure/vandermonde_test.go
  81. 0
      pkg/storage/donut/.gitignore
  82. 0
      pkg/storage/donut/LICENSE
  83. 0
      pkg/storage/donut/README.md
  84. 0
      pkg/storage/donut/donut.go
  85. 0
      pkg/storage/donut/donut_bucket.go
  86. 0
      pkg/storage/donut/donut_bucket_internal.go
  87. 0
      pkg/storage/donut/donut_common.go
  88. 0
      pkg/storage/donut/donut_disk.go
  89. 0
      pkg/storage/donut/donut_disk_internal.go
  90. 2
      pkg/storage/donut/donut_encoder.go
  91. 0
      pkg/storage/donut/donut_internal_interfaces.go
  92. 0
      pkg/storage/donut/donut_node.go
  93. 0
      pkg/storage/donut/donut_object.go
  94. 0
      pkg/storage/donut/donut_public_interfaces.go
  95. 0
      pkg/storage/donut/donut_rebalance.go
  96. 0
      pkg/storage/donut/donut_test.go
  97. 0
      pkg/storage/donut/management.go
  98. 0
      pkg/storage/donut/objectstorage.go
  99. 0
      pkg/storage/donut/objectstorage_internal.go
  100. 1
      pkg/storage/drivers
  101. Some files were not shown because too many files have changed in this diff Show More

12
Godeps/Godeps.json generated vendored

@ -1,6 +1,6 @@
{
"ImportPath": "github.com/minio-io/minio",
"GoVersion": "go1.4.2",
"GoVersion": "go1.4",
"Packages": [
"./..."
],
@ -22,17 +22,9 @@
"Comment": "1.2.0-102-gecb385c",
"Rev": "ecb385c3fefd53678e3b6beba6a608fb7c8dfac1"
},
{
"ImportPath": "github.com/minio-io/donut",
"Rev": "107c0aff49fb961c2c7bfd1e5d1c26c958accbdc"
},
{
"ImportPath": "github.com/minio-io/erasure",
"Rev": "8a72b14991a6835b4d30403e7cb201f373b7cb3a"
},
{
"ImportPath": "github.com/minio-io/iodine",
"Rev": "55cc4d4256c68fbd6f0775f1a25e37e6a2f6457e"
"Rev": "9a63d02ce3934e159d00732f15e096e4f86a6dbb"
},
{
"ImportPath": "github.com/stretchr/objx",

@ -1,30 +0,0 @@
{
"ImportPath": "github.com/minio-io/donut",
"GoVersion": "go1.4",
"Packages": [
"./..."
],
"Deps": [
{
"ImportPath": "github.com/minio-io/check",
"Rev": "bc4e66da8cd7ff58a4b9b84301f906352b8f2c94"
},
{
"ImportPath": "github.com/minio-io/cli",
"Comment": "1.2.0-102-gecb385c",
"Rev": "ecb385c3fefd53678e3b6beba6a608fb7c8dfac1"
},
{
"ImportPath": "github.com/minio-io/erasure",
"Rev": "8a72b14991a6835b4d30403e7cb201f373b7cb3a"
},
{
"ImportPath": "github.com/minio-io/iodine",
"Rev": "55cc4d4256c68fbd6f0775f1a25e37e6a2f6457e"
},
{
"ImportPath": "github.com/minio-io/minio/pkg/utils/split",
"Rev": "936520e6e0fc5dd4ce8d04504ee991084555e57a"
}
]
}

@ -1,5 +0,0 @@
This directory tree is generated automatically by godep.
Please do not edit.
See https://github.com/tools/godep for more information.

@ -1,69 +0,0 @@
MINIOPATH=$(GOPATH)/src/github.com/minio-io/donut
all: getdeps install
checkdeps:
@echo "Checking deps:"
@(env bash $(PWD)/buildscripts/checkdeps.sh)
checkgopath:
@echo "Checking if project is at ${MINIOPATH}"
@if [ ! -d ${MINIOPATH} ]; then echo "Project not found in $GOPATH, please follow instructions provided at https://github.com/Minio-io/minio/blob/master/CONTRIBUTING.md#setup-your-minio-github-repository" && exit 1; fi
getdeps: checkdeps checkgopath
@go get github.com/minio-io/godep && echo "Installed godep:"
@go get github.com/golang/lint/golint && echo "Installed golint:"
@go get golang.org/x/tools/cmd/vet && echo "Installed vet:"
@go get github.com/fzipp/gocyclo && echo "Installed gocyclo:"
verifiers: getdeps vet fmt lint cyclo
vet:
@echo "Running $@:"
@go vet ./...
fmt:
@echo "Running $@:"
@test -z "$$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)" || \
echo "+ please format Go code with 'gofmt -s'"
lint:
@echo "Running $@:"
@test -z "$$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
cyclo:
@echo "Running $@:"
@test -z "$$(gocyclo -over 15 . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)"
pre-build:
@echo "Running pre-build:"
@(env bash $(PWD)/buildscripts/git-commit-id.sh)
build-all: getdeps verifiers
@echo "Building Libraries:"
@godep go generate github.com/minio-io/erasure
@godep go generate ./...
@godep go build -a ./... # have no stale packages
test-all: pre-build build-all
@echo "Running Test Suites:"
@godep go test -race ./...
save: restore
@godep save ./...
restore:
@godep restore
env:
@godep go env
docs-deploy:
@mkdocs gh-deploy --clean
install: test-all
@echo "Installing donut tool:"
@godep go install -a github.com/minio-io/donut/cmd/donut
@mkdir -p $(HOME)/.minio/donut
clean:
@rm -fv cover.out
@rm -fv build-constants.go

@ -1,201 +0,0 @@
#!/usr/bin/env bash
#
# Minio Commander, (C) 2015 Minio, Inc.
#
# Licensed 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.
#
_init() {
## Minimum required versions for build dependencies
GCC_VERSION="4.0"
CLANG_VERSION="3.5"
YASM_VERSION="1.2.0"
GIT_VERSION="1.0"
GO_VERSION="1.4"
OSX_VERSION="10.8"
UNAME=$(uname -sm)
## Check all dependencies are present
MISSING=""
}
###
#
# Takes two arguments
# arg1: version number in `x.x.x` format
# arg2: version number in `x.x.x` format
#
# example: check_version "$version1" "$version2"
#
# returns:
# 0 - Installed version is equal to required
# 1 - Installed version is greater than required
# 2 - Installed version is lesser than required
# 3 - If args have length zero
#
####
check_version () {
## validate args
[[ -z "$1" ]] && return 3
[[ -z "$2" ]] && return 3
if [[ $1 == $2 ]]; then
return 0
fi
local IFS=.
local i ver1=($1) ver2=($2)
# fill empty fields in ver1 with zeros
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do
ver1[i]=0
done
for ((i=0; i<${#ver1[@]}; i++)); do
if [[ -z ${ver2[i]} ]]; then
# fill empty fields in ver2 with zeros
ver2[i]=0
fi
if ((10#${ver1[i]} > 10#${ver2[i]})); then
return 1
fi
if ((10#${ver1[i]} < 10#${ver2[i]})); then
## Installed version is lesser than required - Bad condition
return 2
fi
done
return 0
}
check_golang_env() {
echo ${GOROOT:?} 2>&1 >/dev/null
if [ $? -eq 1 ]; then
echo "ERROR"
echo "GOROOT environment variable missing, please refer to Go installation document"
echo "https://github.com/Minio-io/minio/blob/master/BUILDDEPS.md#install-go-13"
exit 1
fi
echo ${GOPATH:?} 2>&1 >/dev/null
if [ $? -eq 1 ]; then
echo "ERROR"
echo "GOPATH environment variable missing, please refer to Go installation document"
echo "https://github.com/Minio-io/minio/blob/master/BUILDDEPS.md#install-go-13"
exit 1
fi
}
is_supported_os() {
case ${UNAME%% *} in
"Linux")
os="linux"
;;
"Darwin")
osx_host_version=$(env sw_vers -productVersion)
check_version "${osx_host_version}" "${OSX_VERSION}"
[[ $? -ge 2 ]] && die "Minimum OSX version supported is ${OSX_VERSION}"
;;
"*")
echo "Exiting.. unsupported operating system found"
exit 1;
esac
}
is_supported_arch() {
local supported
case ${UNAME##* } in
"x86_64")
supported=1
;;
*)
supported=0
;;
esac
if [ $supported -eq 0 ]; then
echo "Invalid arch: ${UNAME} not supported, please use x86_64/amd64"
exit 1;
fi
}
check_deps() {
check_version "$(env go version 2>/dev/null | sed 's/^.* go\([0-9.]*\).*$/\1/')" "${GO_VERSION}"
if [ $? -ge 2 ]; then
MISSING="${MISSING} golang(1.4)"
fi
check_version "$(env git --version 2>/dev/null | sed -e 's/^.* \([0-9.\].*\).*$/\1/' -e 's/^\([0-9.\]*\).*/\1/g')" "${GIT_VERSION}"
if [ $? -ge 2 ]; then
MISSING="${MISSING} git"
fi
case ${UNAME%% *} in
"Linux")
check_version "$(env gcc --version 2>/dev/null | sed 's/^.* \([0-9.]*\).*$/\1/' | head -1)" "${GCC_VERSION}"
if [ $? -ge 2 ]; then
MISSING="${MISSING} build-essential"
fi
;;
"Darwin")
check_version "$(env gcc --version 2>/dev/null | sed 's/^.* \([0-9.]*\).*$/\1/' | head -1)" "${CLANG_VERSION}"
if [ $? -ge 2 ]; then
MISSING="${MISSING} xcode-cli"
fi
;;
"*")
;;
esac
check_version "$(env yasm --version 2>/dev/null | sed 's/^.* \([0-9.]*\).*$/\1/' | head -1)" "${YASM_VERSION}"
if [ $? -ge 2 ]; then
MISSING="${MISSING} yasm(1.2.0)"
fi
env mkdocs help >/dev/null 2>&1
if [ $? -ne 0 ]; then
MISSING="${MISSING} mkdocs"
fi
}
main() {
echo -n "Check for supported arch.. "
is_supported_arch
echo -n "Check for supported os.. "
is_supported_os
echo -n "Checking if proper environment variables are set.. "
check_golang_env
echo "Done"
echo "Using GOPATH=${GOPATH} and GOROOT=${GOROOT}"
echo -n "Checking dependencies for Minio.. "
check_deps
## If dependencies are missing, warn the user and abort
if [ "x${MISSING}" != "x" ]; then
echo "ERROR"
echo
echo "The following build tools are missing:"
echo
echo "** ${MISSING} **"
echo
echo "Please install them "
echo "${MISSING}"
echo
echo "Follow https://github.com/Minio-io/minio/blob/master/BUILDDEPS.md for further instructions"
exit 1
fi
echo "Done"
}
_init && main "$@"

@ -1,18 +0,0 @@
#!/usr/bin/env bash
CONST_FILE=${PWD}/cmd/donut/build-constants.go
cat > $CONST_FILE <<EOF
/*
* ** DO NOT EDIT THIS FILE. THIS FILE IS AUTO GENERATED BY RUNNING MAKE **
*/
package main
const (
gitCommitHash = "__GIT_COMMIT_HASH__"
)
EOF
commit_id=$(git log --format="%H" -n 1)
sed -i "s/__GIT_COMMIT_HASH__/$commit_id/" $CONST_FILE

@ -1,6 +0,0 @@
*.o
*.a
*.so
*~
*.dSYM
*.syso

@ -27,6 +27,8 @@ import (
"strconv"
"strings"
"sync"
"github.com/dustin/go-humanize"
)
// WrappedError is the iodine error which contains a pointer to the original error
@ -43,6 +45,7 @@ type Error struct {
type StackEntry struct {
Host string
File string
Func string
Line int
Data map[string]string
}
@ -125,7 +128,9 @@ func New(err error, data map[string]string) error {
// createStackEntry - create stack entries
func createStackEntry() StackEntry {
host, _ := os.Hostname()
_, file, line, _ := runtime.Caller(2)
pc, file, line, _ := runtime.Caller(2)
function := runtime.FuncForPC(pc).Name()
_, function = path.Split(function)
file = strings.TrimPrefix(file, gopath) // trim gopath from file
data := GetGlobalState()
@ -136,6 +141,7 @@ func createStackEntry() StackEntry {
entry := StackEntry{
Host: host,
File: file,
Func: function,
Line: line,
Data: data,
}
@ -155,10 +161,10 @@ func getSystemData() map[string]string {
"sys.arch": runtime.GOARCH,
"sys.go": runtime.Version(),
"sys.cpus": strconv.Itoa(runtime.NumCPU()),
"sys.mem.used": strconv.FormatUint(memstats.Alloc, 10),
"sys.mem.allocated": strconv.FormatUint(memstats.TotalAlloc, 10),
"sys.mem.heap.used": strconv.FormatUint(memstats.HeapAlloc, 10),
"sys.mem.heap.allocated": strconv.FormatUint(memstats.HeapSys, 10),
"sys.mem.used": humanize.Bytes(memstats.Alloc),
"sys.mem.allocated": humanize.Bytes(memstats.TotalAlloc),
"sys.mem.heap.used": humanize.Bytes(memstats.HeapAlloc),
"sys.mem.heap.allocated": humanize.Bytes(memstats.HeapSys),
}
}
@ -182,7 +188,8 @@ func (err Error) EmitHumanReadable() string {
var errorBuffer bytes.Buffer
fmt.Fprintln(&errorBuffer, err.ErrorMessage)
for i, entry := range err.Stack {
fmt.Fprintln(&errorBuffer, "-", i, entry.Host+":"+entry.File+":"+strconv.Itoa(entry.Line), entry.Data)
prettyData, _ := json.Marshal(entry.Data)
fmt.Fprintln(&errorBuffer, "-", i, entry.Host+":"+entry.File+":"+strconv.Itoa(entry.Line)+" "+entry.Func+"():", string(prettyData))
}
return string(errorBuffer.Bytes())
}

@ -17,9 +17,11 @@
package iodine
import (
"encoding/json"
"errors"
"fmt"
"testing"
"encoding/json"
)
func TestIodine(t *testing.T) {
@ -27,9 +29,13 @@ func TestIodine(t *testing.T) {
iodineError = New(iodineError, nil)
iodineError = New(iodineError, nil)
iodineError = New(iodineError, nil)
switch typedError := iodineError.(type) {
case Error:
{
// Visually watch out for formating errors
fmt.Println(typedError.EmitHumanReadable())
if len(typedError.Stack) != 4 {
t.Fail()
}

@ -39,7 +39,6 @@ pre-build:
build-all: verifiers
@echo "Building Libraries:"
@godep go generate github.com/minio-io/erasure
@godep go generate ./...
@godep go build -a ./... # have no stale packages

@ -0,0 +1 @@
*.syso

@ -20,8 +20,8 @@ import (
"errors"
"strconv"
encoding "github.com/minio-io/erasure"
"github.com/minio-io/iodine"
encoding "github.com/minio-io/minio/pkg/erasure"
)
// encoder internal struct

@ -1 +0,0 @@
Subproject commit 64e55f18297dd962102afc7e81ea63488fc4706a

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save