com.scudata.expression.mfn.file.Open Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of esproc Show documentation
Show all versions of esproc Show documentation
SPL(Structured Process Language) A programming language specially for structured data computing.
package com.scudata.expression.mfn.file;
import com.scudata.dm.Context;
import com.scudata.dw.ComTable;
import com.scudata.expression.FileFunction;
import com.scudata.parallel.ClusterFile;
/**
* ?????
* f.open()
* @author RunQian
*
*/
public class Open extends FileFunction {
public Object calculate(Context ctx) {
if (file.isRemoteFile()) {
// Զ???ļ?
String host = file.getIP();
int port = file.getPort();
String fileName = file.getFileName();
Integer partition = file.getPartition();
int p = partition == null ? -1 : partition.intValue();
ClusterFile cf = new ClusterFile(host, port, fileName, p, ctx);
return cf.openGroupTable(ctx);
} else {
return ComTable.openBaseTable(file, ctx);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy