logplus/Workflow/WFEngine/WorkflowEngine/include/WorkflowTool.h

55 lines
1.6 KiB
C
Raw Normal View History

2026-01-16 17:18:41 +08:00
/**
* @file WorkflowTool.h
* @brief (jar submit)
* @author huojidong
*/
#ifndef PAI_HOME_WORKFLOWENGINE_WORKFLOWTOOLS_H
#define PAI_HOME_WORKFLOWENGINE_WORKFLOWTOOLS_H
#include <string>
namespace pai {
namespace workflow {
class CWorkflowTool
{
public:
CWorkflowTool();
~CWorkflowTool();
public:
/**
* @brief jar包
* @param jsonfilepath json路径
* @param jarfilename jar包文件名()
*/
bool GenerateJarFile(const std::string &jsonfilepath,const std::string&jarfilename,const std::string &destjarpath);
/**
* @brief Jar包文件路径
*/
std::string GetDestJarPath()const {return destJarPath;}
/**
* @brief Jar包的路径
*/
void SetDestJarPath(std::string inputJarPath){inputJarPath.append("/");destJarPath=inputJarPath;}
private:
/**
*@brief json文件拷贝到临时目录的之下compiler下的GeneratorJobFile函数
*@param strFilePath json路径
*@param strCompileTmpDir
*/
bool SaveJsonToLocalCompileTmp(const std::string& strFilePath,const std::string& strCompileTmpDir);
/**
*@brief jar文件拷贝到PAI_HOME下的res目录下
*@param strCompileTmpDir
*@param jarfilename jar包文件名
*@param jardestpath jar包存储路径
*/
bool CopyJarFileToDestFilePath(const std::string&strCompileTmpDir,const std::string& jarfilename);
private:
std::string destJarPath;//目标路径地址
};
}
}
#endif