Skip to content

Commit

Permalink
ZOOKEEPER-4230: Use dynamic temp folder instead of static temp folder…
Browse files Browse the repository at this point in the history
… in RestMain

Author: Mukti <[email protected]>

Reviewers: Enrico Olivelli <[email protected]>, Mohammad Arshad <[email protected]>

Closes apache#1633 from MuktiKrishnan/ZOOKEEPER-4230-master
  • Loading branch information
MuktiKrishnan authored and RokLenarcic committed Aug 31, 2022
1 parent 6825640 commit e0969ac
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -53,7 +54,8 @@ public void start() throws IOException {
System.out.println("Starting grizzly ...");

boolean useSSL = cfg.useSSL();
gws = new GrizzlyWebServer(cfg.getPort(), "/tmp/23cxv45345/2131xc2/", useSSL);
String zkRestResourcesTempPath = Files.createTempDirectory("zkRestResourcesTempPath").toFile().getCanonicalPath();
gws = new GrizzlyWebServer(cfg.getPort(), zkRestResourcesTempPath, useSSL);
// BUG: Grizzly needs a doc root if you are going to register multiple adapters

for (Endpoint e : cfg.getEndpoints()) {
Expand Down

0 comments on commit e0969ac

Please sign in to comment.