-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Wine93 <[email protected]>
- Loading branch information
Showing
16 changed files
with
276 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
container_name: curve-build-playground.master | ||
container_image: opencurvedocker/curve-base:build-debian11 | ||
container_image: opencurvedocker/curve-build:ubuntu22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,12 @@ How to build | |
|
||
``` bash | ||
$ git clone [email protected]:opencurve/curve.git | ||
$ cd curve | ||
$ make dep stor=fs | ||
$ make playground | ||
$ make ci-dep stor=fs | ||
$ make sdk | ||
``` | ||
|
||
It will generate a jar after build success: | ||
It will generate a jar package after build success: | ||
|
||
``` | ||
Build SDK success => /curve/curvefs/sdk/output/curvefs-hadoop-1.0-SNAPSHOT.jar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
curvefs/sdk/java/src/main/java/io/opencurve/curve/fs/common/AccessLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package io.opencurve.curve.fs.common; | ||
|
||
public class AccessLogger { | ||
private String classname; | ||
private int level; | ||
|
||
private static final String CURVEFS_DEBUG_ENV_VAR = "CURVEFS_DEBUG"; | ||
|
||
public AccessLogger(String classname, int level) { | ||
this.classname = classname; | ||
this.level = level; | ||
} | ||
|
||
public void log(String fn, Object... args) { | ||
String value = System.getenv(CURVEFS_DEBUG_ENV_VAR); | ||
if (!Boolean.valueOf(value)) { | ||
return; | ||
} | ||
|
||
String[] params = new String[args.length]; | ||
for (int i = 0; i < args.length; i++) { | ||
params[i] = args[i].toString(); | ||
} | ||
|
||
String indent = " ".repeat(this.level * 4); | ||
String param = String.join(",", params); | ||
String message = String.format("+ %s%s.%s(%s)", indent, this.classname, fn, param); | ||
System.out.println(message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.