All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scudata.expression.mfn.file.FileGroupRollback Maven / Gradle / Ivy

Go to download

SPL(Structured Process Language) A programming language specially for structured data computing.

There is a newer version: 20240823
Show newest version
package com.scudata.expression.mfn.file;

import java.io.File;

import com.scudata.dm.Context;
import com.scudata.dm.Sequence;
import com.scudata.expression.FileGroupFunction;

/**
 * ???????????ļ?ʧ?ܣ????ô˺????ָ?????
 * f.rollback()
 * @author RunQian
 *
 */
public class FileGroupRollback extends FileGroupFunction {
	public Object calculate(Context ctx) {
		int pcount = fg.getPartitionCount();
		Sequence result = new Sequence(pcount);
		
		for (int i = 0; i < pcount; ++i) {
			File file = fg.getPartitionFile(i);
			if (Rollback.groupTableRollBack(file, null, ctx)) {
				result.add(Boolean.TRUE);
			} else {
				result.add(Boolean.FALSE);
			}
		}
		
		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy