Skip to content

Commit

Permalink
fix jindo some parameter to bool (fluid-cloudnative#1480)
Browse files Browse the repository at this point in the history
* enable run jindo dataload synchronously

Signed-off-by: frankleaf <[email protected]>

* fix digit to ture/false

Signed-off-by: frankleaf <[email protected]>

* fix test

Signed-off-by: frankleaf <[email protected]>

* fix test

Signed-off-by: frankleaf <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
  • Loading branch information
frankleaf authored and zwwhdls committed Mar 18, 2022
1 parent 45e5d4d commit 0f23ad9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pkg/ddc/jindo/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,19 +372,19 @@ func (e *JindoEngine) transformFuse(runtime *datav1alpha1.JindoRuntime, value *J
"client.oss.connection.timeout.millisecond": "3000",
"client.storage.connect.enable": "true",
"jfs.cache.meta-cache.enable": "0",
"jfs.cache.data-cache.enable": "1",
"jfs.cache.data-cache.slicecache.enable": "1",
"jfs.cache.data-cache.enable": "true",
"jfs.cache.data-cache.slicecache.enable": "true",
}

// "client.storage.rpc.port": "6101",
properties["client.storage.rpc.port"] = strconv.Itoa(value.Worker.Port.Rpc)

if e.getTieredStoreType(runtime) == 0 {
// MEM
properties["jfs.cache.ram-cache.enable"] = "1"
properties["jfs.cache.ram-cache.enable"] = "true"
} else if e.getTieredStoreType(runtime) == 1 || e.getTieredStoreType(runtime) == 2 {
// HDD and SSD
properties["jfs.cache.ram-cache.enable"] = "0"
properties["jfs.cache.ram-cache.enable"] = "false"
}

if len(runtime.Spec.Fuse.Properties) > 0 {
Expand Down Expand Up @@ -469,7 +469,7 @@ func (e *JindoEngine) transformWorkerMountPath(originPath []string) map[string]s
}

func (e *JindoEngine) transformFuseArg(runtime *datav1alpha1.JindoRuntime, dataset *datav1alpha1.Dataset) []string {
var baseArg = "-okernel_cache -oattr_timeout=9000 -oentry_timeout=9000"
var baseArg = "-okernel_cache"
var rootArg = ""
var secretArg = ""
if len(dataset.Spec.Mounts) > 0 && dataset.Spec.Mounts[0].Path != "" {
Expand Down
4 changes: 2 additions & 2 deletions pkg/ddc/jindo/transform_fuse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestTransformFuseWithNoArgs(t *testing.T) {
MountPoint: "local:///mnt/test",
Name: "test",
}},
}}, &Jindo{}, "1"},
}}, &Jindo{}, "true"},
}
for _, test := range tests {
engine := &JindoEngine{Log: log.NullLogger{}}
Expand Down Expand Up @@ -131,7 +131,7 @@ func TestTransformFuseArg(t *testing.T) {
Name: "test",
Path: "/",
}},
}}, &Jindo{}, "-ocredential_provider=secrets:///token/ -oroot_ns=jindo -okernel_cache -oattr_timeout=9000 -oentry_timeout=9000"},
}}, &Jindo{}, "-ocredential_provider=secrets:///token/ -oroot_ns=jindo -okernel_cache"},
}
for _, test := range tests {
engine := &JindoEngine{Log: log.NullLogger{}}
Expand Down

0 comments on commit 0f23ad9

Please sign in to comment.