Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. upload packages to bookkeeper will include a UUID 2. incorrect setName - > setNamespace
- Loading branch information
Showing
7 changed files
with
78 additions
and
45 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
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
35 changes: 35 additions & 0 deletions
35
...ime/src/main/java/org/apache/pulsar/functions/runtime/worker/PackageLocationMetaData.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,35 @@ | |||
package org.apache.pulsar.functions.runtime.worker; | |||
|
|||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.ToString; | |||
|
|||
import java.io.Serializable; | |||
import java.net.URI; | |||
|
|||
@Data | |||
@Setter | |||
@Getter | |||
@EqualsAndHashCode | |||
@ToString | |||
public class PackageLocationMetaData implements Serializable{ | |||
private String packageName; | |||
private String packageNamespace; | |||
private String dlogUri; | |||
|
|||
public URI getPackageNamespaceURI() { | |||
URI baseUri = URI.create(this.dlogUri); | |||
String zookeeperHost = baseUri.getHost(); | |||
int zookeeperPort = baseUri.getPort(); | |||
return URI.create( | |||
String.format("distributedlog://%s:%d/%s", | |||
zookeeperHost, zookeeperPort, this.packageNamespace)); | |||
} | |||
|
|||
public String getPackageURI() { | |||
return String.format("%s/%s", this.getPackageNamespaceURI().toString(), this.packageName); | |||
} | |||
|
|||
} |
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
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