-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from italiangrid/release/1.11.15
Release v1.11.15
- Loading branch information
Showing
67 changed files
with
1,604 additions
and
7,721 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,33 @@ | ||
package it.grid.storm; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class Main { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(Main.class); | ||
|
||
private Main() {} | ||
|
||
public static void main(String[] args) { | ||
|
||
Thread.setDefaultUncaughtExceptionHandler(new StoRMDefaultUncaughtExceptionHandler()); | ||
|
||
StoRM storm = new StoRM(); | ||
|
||
Runtime.getRuntime().addShutdownHook(new ShutdownHook(storm)); | ||
|
||
if (storm.startServices()) { | ||
|
||
log.info("StoRM: Backend services successfully started."); | ||
|
||
} else { | ||
|
||
log.error("StoRM: error starting storm services."); | ||
|
||
storm.stopServices(); | ||
|
||
Runtime.getRuntime().exit(1); | ||
} | ||
} | ||
} |
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,42 @@ | ||
package it.grid.storm; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import it.grid.storm.space.gpfsquota.GPFSQuotaManager; | ||
|
||
public class ShutdownHook extends Thread { | ||
|
||
private static final Logger log = LoggerFactory.getLogger(ShutdownHook.class); | ||
|
||
private StoRM storm; | ||
|
||
public ShutdownHook(StoRM storm) { | ||
this.storm = storm; | ||
} | ||
|
||
@Override | ||
public void run() { | ||
|
||
log.info("StoRM: Backend shutdown..."); | ||
log.info("StoRM: stopping Backend services..."); | ||
|
||
try { | ||
storm.stopPicker(); | ||
storm.stopXmlRpcServer(); | ||
storm.stopRestServer(); | ||
storm.stopSpaceGC(); | ||
storm.stopExpiredAgent(); | ||
GPFSQuotaManager.INSTANCE.shutdown(); | ||
|
||
log.info("StoRM: Backend successfully stopped."); | ||
|
||
} catch (Throwable e) { | ||
|
||
log.error(e.getMessage(), e); | ||
log.error("StoRM: error stopping storm services."); | ||
} | ||
|
||
log.info("StoRM: Backend shutdown complete."); | ||
} | ||
} |
Oops, something went wrong.