8000 API changes: add 'omitempty'; bump versions · NVIDIA/aistore@6c171cd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 6c171cd

Browse files
committed
API changes: add 'omitempty'; bump versions
Signed-off-by: Alex Aizman <alex.aizman@gmail.com>
1 parent 0bcbb72 commit 6c171cd

File tree

4 files changed

+30
-29
lines changed

4 files changed

+30
-29
lines changed

ais/tgtetl.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,15 @@ func (t *target) stopETL(w http.ResponseWriter, r *http.Request, etlName string)
164164
func (t *target) inlineETL(w http.ResponseWriter, r *http.Request, dpq *dpq, lom *core.LOM) {
165165
comm, errN := etl.GetCommunicator(dpq.etl.name)
166166
if errN != nil {
167-
if cos.IsErrNotFound(errN) {
167+
switch {
168+
case cos.IsErrNotFound(errN):
168169
smap := t.owner.smap.Get()
169-
errNV := fmt.Errorf("%v - try starting new ETL with \"%s/v1/etl/init\" endpoint",
170-
errN, smap.Primary.URL(cmn.NetPublic))
171-
t.writeErr(w, r, errNV, http.StatusNotFound)
172-
return
170+
pub := smap.Primary.URL(cmn.NetPublic)
171+
err := fmt.Errorf("%v - try starting new ETL with \"%s/v1/etl/init\" endpoint", errN, pub)
172+
t.writeErr(w, r, err, http.StatusNotFound)
173+
default:
174+
t.writeErr(w, r, errN)
173175
}
174-
t.writeErr(w, r, errN)
175176
return
176177
}
177178

@@ -181,7 +182,7 @@ func (t *target) inlineETL(w http.ResponseWriter, r *http.Request, dpq *dpq, lom
181182

182183
if err == nil {
183184
xetl.ObjsAdd(1, lom.Lsize(true)) // _special_ as the transformed size could be `cos.ContentLengthUnknown` at this point
184-
return
185+
return // ok
185186
}
186187

187188
// NOTE:

api/apc/multiobj.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ func (lrm *ListRange) Str(sb *strings.Builder, isPrefix bool) {
6060
// prefetch
6161
type PrefetchMsg struct {
6262
ListRange
63-
BlobThreshold int64 `json:"blob-threshold"` // when greater than threshold prefetch using blob-downloader; otherwise cold GET
64-
NumWorkers int `json:"num-workers"` // number of concurrent workers; 0 - number of mountpaths (default); (-1) none
65-
ContinueOnError bool `json:"coer"` // ignore non-critical errors, keep going
66-
LatestVer bool `json:"latest-ver"` // when true & in-cluster: check with remote whether (deleted | version-changed)
67-
NonRecurs bool `json:"non-recurs"` // do not prefetch nested subdirs (see also: `apc.LsNoRecursion`, `apc.CopyBckMsg`, `apc.EvdMsg`)
63+
BlobThreshold int64 `json:"blob-threshold"` // when greater than threshold prefetch using blob-downloader; otherwise cold GET
64+
NumWorkers int `json:"num-workers"` // number of concurrent workers; 0 - number of mountpaths (default); (-1) none
65+
ContinueOnError bool `json:"coer"` // ignore non-critical errors, keep going
66+
LatestVer bool `json:"latest-ver"` // when true & in-cluster: check with remote whether (deleted | version-changed)
67+
NonRecurs bool `json:"non-recurs,omitempty"` // do not prefetch nested subdirs (see also: `apc.LsNoRecursion`, `apc.CopyBckMsg`, `apc.EvdMsg`)
6868
}
6969

7070
// +ctlmsg
@@ -112,9 +112,9 @@ type ArchiveMsg struct {
112112
ArchName string `json:"archname"` // one of the archive.FileExtensions
113113
Mime string `json:"mime"` // user-specified mime type (NOTE: takes precedence if defined)
114114
ListRange
115-
BaseNameOnly bool `json:"bnonly"` // only extract the base name of objects as names of archived objects
116-
InclSrcBname bool `json:"isbn"` // include source bucket name into the names of archived objects
117-
AppendIfExists bool `json:"aate"` // adding a list or a range of objects to an existing archive
118-
ContinueOnError bool `json:"coer"` // on err, keep running arc xaction in a any given multi-object transaction
119-
NonRecurs bool `json:"non-recurs"` // do not archive contents of nested virtual subdirectories (see also: `apc.LsNoRecursion`, `apc.CopyBckMsg`)
115+
BaseNameOnly bool `json:"bnonly"` // only extract the base name of objects as names of archived objects
116+
InclSrcBname bool `json:"isbn"` // include source bucket name into the names of archived objects
117+
AppendIfExists bool `json:"aate"` // adding a list or a range of objects to an existing archive
118+
ContinueOnError bool `json:"coer"` // on err, keep running arc xaction in a any given multi-object transaction
119+
NonRecurs bool `json:"non-recurs,omitempty"` // do not archive contents of nested virtual subdirectories (see also: `apc.LsNoRecursion`, `apc.CopyBckMsg`)
120120
}

api/apc/tcbtco.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import (
1818

1919
type (
2020
CopyBckMsg struct {
21-
Prepend string `json:"prepend"` // destination naming, as in: dest-obj-name = Prepend + source-obj-name
22-
Prefix string `json:"prefix"` // prefix to select matching _source_ objects or virtual directories
23-
DryRun bool `json:"dry_run"` // visit all source objects, don't make any modifications
24-
Force bool `json:"force"` // force running in presence of "limited coexistence" type conflicts
25-
LatestVer bool `json:"latest-ver"` // see also: QparamLatestVer, 'versioning.validate_warm_get', PrefetchMsg
26-
Sync bool `json:"synchronize"` // see also: 'versioning.synchronize'
27-
NonRecurs bool `json:"non-recurs"` // do not copy contents of nested virtual subdirectories (see also: `apc.LsNoRecursion`, `apc.EvdMsg`)
21+
Prepend string `json:"prepend"` // destination naming, as in: dest-obj-name = Prepend + source-obj-name
22+
Prefix string `json:"prefix"` // prefix to select matching _source_ objects or virtual directories
23+
DryRun bool `json:"dry_run"` // visit all source objects, don't make any modifications
24+
Force bool `json:"force"` // force running in presence of "limited coexistence" type conflicts
25+
LatestVer bool `json:"latest-ver"` // see also: QparamLatestVer, 'versioning.validate_warm_get', PrefetchMsg
26+
Sync bool `json:"synchronize"` // see also: 'versioning.synchronize'
27+
NonRecurs bool `json:"non-recurs,omitempty"` // do not copy contents of nested virtual subdirectories (see also: `apc.LsNoRecursion`, `apc.EvdMsg`)
2828
}
2929
Transform struct {
3030
Name string `json:"id,omitempty"`
@@ -46,9 +46,9 @@ type (
4646
// user-defined number of concurrent workers:
4747
// * 0: number of mountpaths (default)
4848
// * -1: single thread, serial execution
49-
NumWorkers int `json:"num-workers"`
49+
NumWorkers int `json:"num-workers,omitempty"`
5050

51-
ContinueOnError bool `json:"coer"`
51+
ContinueOnError bool `json:"coer,omitempty"`
5252
}
5353

5454
// multi-object

cmn/ver_const.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ const GitHubHome = "https://github.com/NVIDIA/aistore"
2626
// `jsp` formats its *signature* and other implementation details.
2727

2828
const (
29-
VersionAIStore = "3.27"
30-
VersionCLI = "1.16"
31-
VersionLoader = "1.12"
29+
VersionAIStore = "3.28.rc1"
30+
VersionCLI = "1.17"
31+
VersionLoader = "1.13"
3232
VersionAuthN = "1.2"
3333
)
3434

0 commit comments

Comments
 (0)
0