Skip to content

Commit 3b6ccb6

Browse files
committed
RunasUserPassword is not required in CreateJobFile.
1 parent 14f9dd0 commit 3b6ccb6

File tree

8 files changed

+307
-1
lines changed

8 files changed

+307
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.36.1342
1+
1.36.1343

ehpc/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ set(ehpc_public_header_model
123123
include/alibabacloud/ehpc/model/GetHybridClusterConfigResult.h
124124
include/alibabacloud/ehpc/model/GetIfEcsTypeSupportHtConfigRequest.h
125125
include/alibabacloud/ehpc/model/GetIfEcsTypeSupportHtConfigResult.h
126+
include/alibabacloud/ehpc/model/GetJobLogRequest.h
127+
include/alibabacloud/ehpc/model/GetJobLogResult.h
126128
include/alibabacloud/ehpc/model/GetPostScriptsRequest.h
127129
include/alibabacloud/ehpc/model/GetPostScriptsResult.h
128130
include/alibabacloud/ehpc/model/GetSchedulerInfoRequest.h
@@ -390,6 +392,8 @@ set(ehpc_src
390392
src/model/GetHybridClusterConfigResult.cc
391393
src/model/GetIfEcsTypeSupportHtConfigRequest.cc
392394
src/model/GetIfEcsTypeSupportHtConfigResult.cc
395+
src/model/GetJobLogRequest.cc
396+
src/model/GetJobLogResult.cc
393397
src/model/GetPostScriptsRequest.cc
394398
src/model/GetPostScriptsResult.cc
395399
src/model/GetSchedulerInfoRequest.cc

ehpc/include/alibabacloud/ehpc/EHPCClient.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@
124124
#include "model/GetHybridClusterConfigResult.h"
125125
#include "model/GetIfEcsTypeSupportHtConfigRequest.h"
126126
#include "model/GetIfEcsTypeSupportHtConfigResult.h"
127+
#include "model/GetJobLogRequest.h"
128+
#include "model/GetJobLogResult.h"
127129
#include "model/GetPostScriptsRequest.h"
128130
#include "model/GetPostScriptsResult.h"
129131
#include "model/GetSchedulerInfoRequest.h"
@@ -448,6 +450,9 @@ namespace AlibabaCloud
448450
typedef Outcome<Error, Model::GetIfEcsTypeSupportHtConfigResult> GetIfEcsTypeSupportHtConfigOutcome;
449451
typedef std::future<GetIfEcsTypeSupportHtConfigOutcome> GetIfEcsTypeSupportHtConfigOutcomeCallable;
450452
typedef std::function<void(const EHPCClient*, const Model::GetIfEcsTypeSupportHtConfigRequest&, const GetIfEcsTypeSupportHtConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetIfEcsTypeSupportHtConfigAsyncHandler;
453+
typedef Outcome<Error, Model::GetJobLogResult> GetJobLogOutcome;
454+
typedef std::future<GetJobLogOutcome> GetJobLogOutcomeCallable;
455+
typedef std::function<void(const EHPCClient*, const Model::GetJobLogRequest&, const GetJobLogOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetJobLogAsyncHandler;
451456
typedef Outcome<Error, Model::GetPostScriptsResult> GetPostScriptsOutcome;
452457
typedef std::future<GetPostScriptsOutcome> GetPostScriptsOutcomeCallable;
453458
typedef std::function<void(const EHPCClient*, const Model::GetPostScriptsRequest&, const GetPostScriptsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPostScriptsAsyncHandler;
@@ -849,6 +854,9 @@ namespace AlibabaCloud
849854
GetIfEcsTypeSupportHtConfigOutcome getIfEcsTypeSupportHtConfig(const Model::GetIfEcsTypeSupportHtConfigRequest &request)const;
850855
void getIfEcsTypeSupportHtConfigAsync(const Model::GetIfEcsTypeSupportHtConfigRequest& request, const GetIfEcsTypeSupportHtConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
851856
GetIfEcsTypeSupportHtConfigOutcomeCallable getIfEcsTypeSupportHtConfigCallable(const Model::GetIfEcsTypeSupportHtConfigRequest& request) const;
857+
GetJobLogOutcome getJobLog(const Model::GetJobLogRequest &request)const;
858+
void getJobLogAsync(const Model::GetJobLogRequest& request, const GetJobLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
859+
GetJobLogOutcomeCallable getJobLogCallable(const Model::GetJobLogRequest& request) const;
852860
GetPostScriptsOutcome getPostScripts(const Model::GetPostScriptsRequest &request)const;
853861
void getPostScriptsAsync(const Model::GetPostScriptsRequest& request, const GetPostScriptsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
854862
GetPostScriptsOutcomeCallable getPostScriptsCallable(const Model::GetPostScriptsRequest& request) const;
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_EHPC_MODEL_GETJOBLOGREQUEST_H_
18+
#define ALIBABACLOUD_EHPC_MODEL_GETJOBLOGREQUEST_H_
19+
20+
#include <alibabacloud/ehpc/EHPCExport.h>
21+
#include <alibabacloud/core/RpcServiceRequest.h>
22+
#include <string>
23+
#include <vector>
24+
#include <map>
25+
26+
namespace AlibabaCloud {
27+
namespace EHPC {
28+
namespace Model {
29+
class ALIBABACLOUD_EHPC_EXPORT GetJobLogRequest : public RpcServiceRequest {
30+
public:
31+
GetJobLogRequest();
32+
~GetJobLogRequest();
33+
long getOffset() const;
34+
void setOffset(long offset);
35+
std::string getExecHost() const;
36+
void setExecHost(const std::string &execHost);
37+
std::string getClusterId() const;
38+
void setClusterId(const std::string &clusterId);
39+
std::string getAccessKeyId() const;
40+
void setAccessKeyId(const std::string &accessKeyId);
41+
std::string getJobId() const;
42+
void setJobId(const std::string &jobId);
43+
int getSize() const;
44+
void setSize(int size);
45+
46+
private:
47+
long offset_;
48+
std::string execHost_;
49+
std::string clusterId_;
50+
std::string accessKeyId_;
51+
std::string jobId_;
52+
int size_;
53+
};
54+
} // namespace Model
55+
} // namespace EHPC
56+
} // namespace AlibabaCloud
57+
#endif // !ALIBABACLOUD_EHPC_MODEL_GETJOBLOGREQUEST_H_
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef ALIBABACLOUD_EHPC_MODEL_GETJOBLOGRESULT_H_
18+
#define ALIBABACLOUD_EHPC_MODEL_GETJOBLOGRESULT_H_
19+
20+
#include <string>
21+
#include <vector>
22+
#include <utility>
23+
#include <alibabacloud/core/ServiceResult.h>
24+
#include <alibabacloud/ehpc/EHPCExport.h>
25+
26+
namespace AlibabaCloud
27+
{
28+
namespace EHPC
29+
{
30+
namespace Model
31+
{
32+
class ALIBABACLOUD_EHPC_EXPORT GetJobLogResult : public ServiceResult
33+
{
34+
public:
35+
36+
37+
GetJobLogResult();
38+
explicit GetJobLogResult(const std::string &payload);
39+
~GetJobLogResult();
40+
std::string getOutputLog()const;
41+
std::string getErrorLog()const;
42+
std::string getJobId()const;
43+
44+
protected:
45+
void parse(const std::string &payload);
46+
private:
47+
std::string outputLog_;
48+
std::string errorLog_;
49+
std::string jobId_;
50+
51+
};
52+
}
53+
}
54+
}
55+
#endif // !ALIBABACLOUD_EHPC_MODEL_GETJOBLOGRESULT_H_

ehpc/src/EHPCClient.cc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,42 @@ EHPCClient::GetIfEcsTypeSupportHtConfigOutcomeCallable EHPCClient::getIfEcsTypeS
18871887
return task->get_future();
18881888
}
18891889

1890+
EHPCClient::GetJobLogOutcome EHPCClient::getJobLog(const GetJobLogRequest &request) const
1891+
{
1892+
auto endpointOutcome = endpointProvider_->getEndpoint();
1893+
if (!endpointOutcome.isSuccess())
1894+
return GetJobLogOutcome(endpointOutcome.error());
1895+
1896+
auto outcome = makeRequest(endpointOutcome.result(), request);
1897+
1898+
if (outcome.isSuccess())
1899+
return GetJobLogOutcome(GetJobLogResult(outcome.result()));
1900+
else
1901+
return GetJobLogOutcome(outcome.error());
1902+
}
1903+
1904+
void EHPCClient::getJobLogAsync(const GetJobLogRequest& request, const GetJobLogAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
1905+
{
1906+
auto fn = [this, request, handler, context]()
1907+
{
1908+
handler(this, request, getJobLog(request), context);
1909+
};
1910+
1911+
asyncExecute(new Runnable(fn));
1912+
}
1913+
1914+
EHPCClient::GetJobLogOutcomeCallable EHPCClient::getJobLogCallable(const GetJobLogRequest &request) const
1915+
{
1916+
auto task = std::make_shared<std::packaged_task<GetJobLogOutcome()>>(
1917+
[this, request]()
1918+
{
1919+
return this->getJobLog(request);
1920+
});
1921+
1922+
asyncExecute(new Runnable([task]() { (*task)(); }));
1923+
return task->get_future();
1924+
}
1925+
18901926
EHPCClient::GetPostScriptsOutcome EHPCClient::getPostScripts(const GetPostScriptsRequest &request) const
18911927
{
18921928
auto endpointOutcome = endpointProvider_->getEndpoint();

ehpc/src/model/GetJobLogRequest.cc

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include <alibabacloud/ehpc/model/GetJobLogRequest.h>
18+
19+
using AlibabaCloud::EHPC::Model::GetJobLogRequest;
20+
21+
GetJobLogRequest::GetJobLogRequest()
22+
: RpcServiceRequest("ehpc", "2018-04-12", "GetJobLog") {
23+
setMethod(HttpRequest::Method::Get);
24+
}
25+
26+
GetJobLogRequest::~GetJobLogRequest() {}
27+
28+
long GetJobLogRequest::getOffset() const {
29+
return offset_;
30+
}
31+
32+
void GetJobLogRequest::setOffset(long offset) {
33+
offset_ = offset;
34+
setParameter(std::string("Offset"), std::to_string(offset));
35+
}
36+
37+
std::string GetJobLogRequest::getExecHost() const {
38+
return execHost_;
39+
}
40+
41+
void GetJobLogRequest::setExecHost(const std::string &execHost) {
42+
execHost_ = execHost;
43+
setParameter(std::string("ExecHost"), execHost);
44+
}
45+
46+
std::string GetJobLogRequest::getClusterId() const {
47+
return clusterId_;
48+
}
49+
50+
void GetJobLogRequest::setClusterId(const std::string &clusterId) {
51+
clusterId_ = clusterId;
52+
setParameter(std::string("ClusterId"), clusterId);
53+
}
54+
55+
std::string GetJobLogRequest::getAccessKeyId() const {
56+
return accessKeyId_;
57+
}
58+
59+
void GetJobLogRequest::setAccessKeyId(const std::string &accessKeyId) {
60+
accessKeyId_ = accessKeyId;
61+
setParameter(std::string("AccessKeyId"), accessKeyId);
62+
}
63+
64+
std::string GetJobLogRequest::getJobId() const {
65+
return jobId_;
66+
}
67+
68+
void GetJobLogRequest::setJobId(const std::string &jobId) {
69+
jobId_ = jobId;
70+
setParameter(std::string("JobId"), jobId);
71+
}
72+
73+
int GetJobLogRequest::getSize() const {
74+
return size_;
75+
}
76+
77+
void GetJobLogRequest::setSize(int size) {
78+
size_ = size;
79+
setParameter(std::string("Size"), std::to_string(size));
80+
}
81+

ehpc/src/model/GetJobLogResult.cc

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include <alibabacloud/ehpc/model/GetJobLogResult.h>
18+
#include <json/json.h>
19+
20+
using namespace AlibabaCloud::EHPC;
21+
using namespace AlibabaCloud::EHPC::Model;
22+
23+
GetJobLogResult::GetJobLogResult() :
24+
ServiceResult()
25+
{}
26+
27+
GetJobLogResult::GetJobLogResult(const std::string &payload) :
28+
ServiceResult()
29+
{
30+
parse(payload);
31+
}
32+
33+
GetJobLogResult::~GetJobLogResult()
34+
{}
35+
36+
void GetJobLogResult::parse(const std::string &payload)
37+
{
38+
Json::Reader reader;
39+
Json::Value value;
40+
reader.parse(payload, value);
41+
setRequestId(value["RequestId"].asString());
42+
if(!value["JobId"].isNull())
43+
jobId_ = value["JobId"].asString();
44+
if(!value["OutputLog"].isNull())
45+
outputLog_ = value["OutputLog"].asString();
46+
if(!value["ErrorLog"].isNull())
47+
errorLog_ = value["ErrorLog"].asString();
48+
49+
}
50+
51+
std::string GetJobLogResult::getOutputLog()const
52+
{
53+
return outputLog_;
54+
}
55+
56+
std::string GetJobLogResult::getErrorLog()const
57+
{
58+
return errorLog_;
59+
}
60+
61+
std::string GetJobLogResult::getJobId()const
62+
{
63+
return jobId_;
64+
}
65+

0 commit comments

Comments
 (0)