added logging

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15352 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-02-14 18:31:12 +00:00
1 parent b9f7d5a480
commit 70e23eebd4
3 files changed
+7 -6

No files matched your search

@@ -145,7 +145,7 @@ public abstract class FileSystemProvisioner implements ExtensionPoint, Describab
* Workspace to be discarded. This workspace is on the node
* this {@link FileSystemProvisioner} is provisioned for.
*/
public abstract void discardWorkspace(AbstractProject<?,?> project, FilePath ws) throws IOException, InterruptedException;
public abstract void discardWorkspace(AbstractProject<?, ?> project, FilePath ws) throws IOException, InterruptedException;
// public abstract void moveWorkspace(AbstractProject<?,?> project, File oldWorkspace, File newWorkspace) throws IOException;
@@ -192,7 +192,7 @@ public abstract class FileSystemProvisioner implements ExtensionPoint, Describab
public void prepareWorkspace(AbstractBuild<?, ?> build, FilePath ws, TaskListener listener) throws IOException, InterruptedException {
}
public void discardWorkspace(AbstractProject<?,?> project, FilePath ws) throws IOException, InterruptedException {
public void discardWorkspace(AbstractProject<?, ?> project, FilePath ws) throws IOException, InterruptedException {
}
/**
@@ -64,7 +64,6 @@ import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
@@ -64,7 +64,7 @@ public class ZFSProvisioner extends FileSystemProvisioner implements Serializabl
});
}
public void prepareWorkspace(AbstractBuild<?,?> build, FilePath ws, TaskListener listener) throws IOException, InterruptedException {
public void prepareWorkspace(AbstractBuild<?,?> build, FilePath ws, final TaskListener listener) throws IOException, InterruptedException {
final String name = build.getProject().getFullName();
ws.act(new FileCallable<Void>() {
@@ -73,7 +73,9 @@ public class ZFSProvisioner extends FileSystemProvisioner implements Serializabl
if(fs!=null) return null; // already on ZFS
// nope. create a file system
fs = libzfs.create(rootDataset+'/'+name, ZFSFileSystem.class);
String fullName = rootDataset + '/' + name;
listener.getLogger().println("Creating a ZFS file system "+fullName+" at "+f);
fs = libzfs.create(fullName, ZFSFileSystem.class);
fs.setMountPoint(f);
fs.mount();
return null;
@@ -81,7 +83,7 @@ public class ZFSProvisioner extends FileSystemProvisioner implements Serializabl
});
}
public void discardWorkspace(AbstractProject<?,?> project, FilePath ws) throws IOException, InterruptedException {
public void discardWorkspace(AbstractProject<?, ?> project, FilePath ws) throws IOException, InterruptedException {
ws.act(new FileCallable<Void>() {
public Void invoke(File f, VirtualChannel channel) throws IOException {
ZFSFileSystem fs = libzfs.getFileSystemByMountPoint(f);