-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add code for addressing services with '/' #137
Changes from all commits
368ecd0
6502ff7
b4c5210
a4c82b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ public class DataWriter { | |
private ReadWriteData data; | ||
|
||
DataWriter(String name, boolean loadData) throws Exception { | ||
|
||
name = name.replaceAll("/", "--"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps it's better call |
||
dbName = name; | ||
file = new File(config.localDir, dbName); | ||
if (loadData) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,10 @@ public int compareTo(Tag t) { | |
}; | ||
|
||
public final String name; | ||
public final String s3Name; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is this field used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, it has been a long week. Indeed their is some code that I have forgotten. Demuxing my large pull request from last year:-) |
||
Tag(String name) { | ||
this.name = name; | ||
this.s3Name = Tag.toS3(name); | ||
} | ||
|
||
@Override | ||
|
@@ -40,6 +42,22 @@ public boolean equals(Object o) { | |
return false; | ||
} | ||
|
||
/** | ||
* Normalize a tagname suitable to be an S3 Filename | ||
*/ | ||
public static String toS3(String name) { | ||
name = name.replaceAll("/","--"); | ||
return name; | ||
} | ||
|
||
/** | ||
* Normalize a tagname from an S3 Filename | ||
*/ | ||
public static String fromS3(String name) { | ||
name = name.replaceAll("--","/"); | ||
return name; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return this.name; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag.fromS3()