[jira] [Commented] (FLINK-17595) JobExceptionsInfo. ExecutionExceptionInfo miss getter method

2020-05-12 Thread Wei Zhang (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-17595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105359#comment-17105359
 ] 

Wei Zhang commented on FLINK-17595:
---

Thank you for your explanation :P

> JobExceptionsInfo. ExecutionExceptionInfo miss getter method
> 
>
> Key: FLINK-17595
> URL: https://issues.apache.org/jira/browse/FLINK-17595
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / REST
>Affects Versions: 1.10.0
>Reporter: Wei Zhang
>Priority: Minor
> Fix For: 1.11.0
>
>
> {code:java}
>   public static final class ExecutionExceptionInfo {
>   public static final String FIELD_NAME_EXCEPTION = "exception";
>   public static final String FIELD_NAME_TASK = "task";
>   public static final String FIELD_NAME_LOCATION = "location";
>   public static final String FIELD_NAME_TIMESTAMP = "timestamp";
>   @JsonProperty(FIELD_NAME_EXCEPTION)
>   private final String exception;
>   @JsonProperty(FIELD_NAME_TASK)
>   private final String task;
>   @JsonProperty(FIELD_NAME_LOCATION)
>   private final String location;
>   @JsonProperty(FIELD_NAME_TIMESTAMP)
>   private final long timestamp;
>   @JsonCreator
>   public ExecutionExceptionInfo(
>   @JsonProperty(FIELD_NAME_EXCEPTION) String exception,
>   @JsonProperty(FIELD_NAME_TASK) String task,
>   @JsonProperty(FIELD_NAME_LOCATION) String location,
>   @JsonProperty(FIELD_NAME_TIMESTAMP) long timestamp) {
>   this.exception = Preconditions.checkNotNull(exception);
>   this.task = Preconditions.checkNotNull(task);
>   this.location = Preconditions.checkNotNull(location);
>   this.timestamp = timestamp;
>   }
>   @Override
>   public boolean equals(Object o) {
>   if (this == o) {
>   return true;
>   }
>   if (o == null || getClass() != o.getClass()) {
>   return false;
>   }
>   JobExceptionsInfo.ExecutionExceptionInfo that = 
> (JobExceptionsInfo.ExecutionExceptionInfo) o;
>   return timestamp == that.timestamp &&
>   Objects.equals(exception, that.exception) &&
>   Objects.equals(task, that.task) &&
>   Objects.equals(location, that.location);
>   }
>   @Override
>   public int hashCode() {
>   return Objects.hash(timestamp, exception, task, 
> location);
>   }
> {code}
> I found jobexceptionsinfo.executionexceptioninfo has no getter method for the 
> field, is it missing?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-17595) JobExceptionsInfo. ExecutionExceptionInfo miss getter method

2020-05-12 Thread Gary Yao (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-17595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105322#comment-17105322
 ] 

Gary Yao commented on FLINK-17595:
--

The REST API, i.e., the specification of the JSON requests and responses, is a 
public API and guaranteed to be stable. However, the Java classes used to 
implement the REST API are not part of the public API (not annotated with 
{{@Public}} or {{@PublicEvolving}}). Even if we added a getter to 
{{ExecutionExceptionInfo}}, we would not guarantee that the class won't be 
renamed or moved to a different package in a next Flink release. Moreover, the 
{{RestClusterClient}} is not part of the public API; 
{{RestClusterClient#sendRequest()}} is even annotated with 
{{@VisibleForTesting}}. The problem seems to be that in the Flink project there 
is not yet a reference client implementation to programmatically interact with 
the REST API. All in all, I am currently against adding a getter to 
{{ExecutionExceptionInfo}}. What you can do in the meantime as a workaround is:

* Access the required field by reflection
* Copy the class and add a getter yourself
* Implement your own client from scratch


> JobExceptionsInfo. ExecutionExceptionInfo miss getter method
> 
>
> Key: FLINK-17595
> URL: https://issues.apache.org/jira/browse/FLINK-17595
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / REST
>Affects Versions: 1.10.0
>Reporter: Wei Zhang
>Priority: Minor
> Fix For: 1.11.0
>
>
> {code:java}
>   public static final class ExecutionExceptionInfo {
>   public static final String FIELD_NAME_EXCEPTION = "exception";
>   public static final String FIELD_NAME_TASK = "task";
>   public static final String FIELD_NAME_LOCATION = "location";
>   public static final String FIELD_NAME_TIMESTAMP = "timestamp";
>   @JsonProperty(FIELD_NAME_EXCEPTION)
>   private final String exception;
>   @JsonProperty(FIELD_NAME_TASK)
>   private final String task;
>   @JsonProperty(FIELD_NAME_LOCATION)
>   private final String location;
>   @JsonProperty(FIELD_NAME_TIMESTAMP)
>   private final long timestamp;
>   @JsonCreator
>   public ExecutionExceptionInfo(
>   @JsonProperty(FIELD_NAME_EXCEPTION) String exception,
>   @JsonProperty(FIELD_NAME_TASK) String task,
>   @JsonProperty(FIELD_NAME_LOCATION) String location,
>   @JsonProperty(FIELD_NAME_TIMESTAMP) long timestamp) {
>   this.exception = Preconditions.checkNotNull(exception);
>   this.task = Preconditions.checkNotNull(task);
>   this.location = Preconditions.checkNotNull(location);
>   this.timestamp = timestamp;
>   }
>   @Override
>   public boolean equals(Object o) {
>   if (this == o) {
>   return true;
>   }
>   if (o == null || getClass() != o.getClass()) {
>   return false;
>   }
>   JobExceptionsInfo.ExecutionExceptionInfo that = 
> (JobExceptionsInfo.ExecutionExceptionInfo) o;
>   return timestamp == that.timestamp &&
>   Objects.equals(exception, that.exception) &&
>   Objects.equals(task, that.task) &&
>   Objects.equals(location, that.location);
>   }
>   @Override
>   public int hashCode() {
>   return Objects.hash(timestamp, exception, task, 
> location);
>   }
> {code}
> I found jobexceptionsinfo.executionexceptioninfo has no getter method for the 
> field, is it missing?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-17595) JobExceptionsInfo. ExecutionExceptionInfo miss getter method

2020-05-11 Thread Wei Zhang (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-17595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17104283#comment-17104283
 ] 

Wei Zhang commented on FLINK-17595:
---

This should be an [open 
API|https://ci.apache.org/projects/flink/flink-docs-release-1.10/monitoring/rest_api.html#jobs-jobid-exceptions
 ], right?

> JobExceptionsInfo. ExecutionExceptionInfo miss getter method
> 
>
> Key: FLINK-17595
> URL: https://issues.apache.org/jira/browse/FLINK-17595
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / REST
>Affects Versions: 1.10.0
>Reporter: Wei Zhang
>Priority: Minor
> Fix For: 1.11.0
>
>
> {code:java}
>   public static final class ExecutionExceptionInfo {
>   public static final String FIELD_NAME_EXCEPTION = "exception";
>   public static final String FIELD_NAME_TASK = "task";
>   public static final String FIELD_NAME_LOCATION = "location";
>   public static final String FIELD_NAME_TIMESTAMP = "timestamp";
>   @JsonProperty(FIELD_NAME_EXCEPTION)
>   private final String exception;
>   @JsonProperty(FIELD_NAME_TASK)
>   private final String task;
>   @JsonProperty(FIELD_NAME_LOCATION)
>   private final String location;
>   @JsonProperty(FIELD_NAME_TIMESTAMP)
>   private final long timestamp;
>   @JsonCreator
>   public ExecutionExceptionInfo(
>   @JsonProperty(FIELD_NAME_EXCEPTION) String exception,
>   @JsonProperty(FIELD_NAME_TASK) String task,
>   @JsonProperty(FIELD_NAME_LOCATION) String location,
>   @JsonProperty(FIELD_NAME_TIMESTAMP) long timestamp) {
>   this.exception = Preconditions.checkNotNull(exception);
>   this.task = Preconditions.checkNotNull(task);
>   this.location = Preconditions.checkNotNull(location);
>   this.timestamp = timestamp;
>   }
>   @Override
>   public boolean equals(Object o) {
>   if (this == o) {
>   return true;
>   }
>   if (o == null || getClass() != o.getClass()) {
>   return false;
>   }
>   JobExceptionsInfo.ExecutionExceptionInfo that = 
> (JobExceptionsInfo.ExecutionExceptionInfo) o;
>   return timestamp == that.timestamp &&
>   Objects.equals(exception, that.exception) &&
>   Objects.equals(task, that.task) &&
>   Objects.equals(location, that.location);
>   }
>   @Override
>   public int hashCode() {
>   return Objects.hash(timestamp, exception, task, 
> location);
>   }
> {code}
> I found jobexceptionsinfo.executionexceptioninfo has no getter method for the 
> field, is it missing?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-17595) JobExceptionsInfo. ExecutionExceptionInfo miss getter method

2020-05-11 Thread Wei Zhang (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-17595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17104281#comment-17104281
 ] 

Wei Zhang commented on FLINK-17595:
---

[~gjy] My application needs to get the exception information for the job, when 
I made the request through RestClusterClient#sendRequest, I found that 
ExecutionExceptionInfo missing getter.

> JobExceptionsInfo. ExecutionExceptionInfo miss getter method
> 
>
> Key: FLINK-17595
> URL: https://issues.apache.org/jira/browse/FLINK-17595
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / REST
>Affects Versions: 1.10.0
>Reporter: Wei Zhang
>Priority: Minor
> Fix For: 1.11.0
>
>
> {code:java}
>   public static final class ExecutionExceptionInfo {
>   public static final String FIELD_NAME_EXCEPTION = "exception";
>   public static final String FIELD_NAME_TASK = "task";
>   public static final String FIELD_NAME_LOCATION = "location";
>   public static final String FIELD_NAME_TIMESTAMP = "timestamp";
>   @JsonProperty(FIELD_NAME_EXCEPTION)
>   private final String exception;
>   @JsonProperty(FIELD_NAME_TASK)
>   private final String task;
>   @JsonProperty(FIELD_NAME_LOCATION)
>   private final String location;
>   @JsonProperty(FIELD_NAME_TIMESTAMP)
>   private final long timestamp;
>   @JsonCreator
>   public ExecutionExceptionInfo(
>   @JsonProperty(FIELD_NAME_EXCEPTION) String exception,
>   @JsonProperty(FIELD_NAME_TASK) String task,
>   @JsonProperty(FIELD_NAME_LOCATION) String location,
>   @JsonProperty(FIELD_NAME_TIMESTAMP) long timestamp) {
>   this.exception = Preconditions.checkNotNull(exception);
>   this.task = Preconditions.checkNotNull(task);
>   this.location = Preconditions.checkNotNull(location);
>   this.timestamp = timestamp;
>   }
>   @Override
>   public boolean equals(Object o) {
>   if (this == o) {
>   return true;
>   }
>   if (o == null || getClass() != o.getClass()) {
>   return false;
>   }
>   JobExceptionsInfo.ExecutionExceptionInfo that = 
> (JobExceptionsInfo.ExecutionExceptionInfo) o;
>   return timestamp == that.timestamp &&
>   Objects.equals(exception, that.exception) &&
>   Objects.equals(task, that.task) &&
>   Objects.equals(location, that.location);
>   }
>   @Override
>   public int hashCode() {
>   return Objects.hash(timestamp, exception, task, 
> location);
>   }
> {code}
> I found jobexceptionsinfo.executionexceptioninfo has no getter method for the 
> field, is it missing?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-17595) JobExceptionsInfo. ExecutionExceptionInfo miss getter method

2020-05-11 Thread Gary Yao (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-17595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17104196#comment-17104196
 ] 

Gary Yao commented on FLINK-17595:
--

[~zhangwei24] Can you explain why you need a getter? This class isn't public 
API.

> JobExceptionsInfo. ExecutionExceptionInfo miss getter method
> 
>
> Key: FLINK-17595
> URL: https://issues.apache.org/jira/browse/FLINK-17595
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / REST
>Affects Versions: 1.10.0
>Reporter: Wei Zhang
>Priority: Minor
> Fix For: 1.11.0
>
>
> {code:java}
>   public static final class ExecutionExceptionInfo {
>   public static final String FIELD_NAME_EXCEPTION = "exception";
>   public static final String FIELD_NAME_TASK = "task";
>   public static final String FIELD_NAME_LOCATION = "location";
>   public static final String FIELD_NAME_TIMESTAMP = "timestamp";
>   @JsonProperty(FIELD_NAME_EXCEPTION)
>   private final String exception;
>   @JsonProperty(FIELD_NAME_TASK)
>   private final String task;
>   @JsonProperty(FIELD_NAME_LOCATION)
>   private final String location;
>   @JsonProperty(FIELD_NAME_TIMESTAMP)
>   private final long timestamp;
>   @JsonCreator
>   public ExecutionExceptionInfo(
>   @JsonProperty(FIELD_NAME_EXCEPTION) String exception,
>   @JsonProperty(FIELD_NAME_TASK) String task,
>   @JsonProperty(FIELD_NAME_LOCATION) String location,
>   @JsonProperty(FIELD_NAME_TIMESTAMP) long timestamp) {
>   this.exception = Preconditions.checkNotNull(exception);
>   this.task = Preconditions.checkNotNull(task);
>   this.location = Preconditions.checkNotNull(location);
>   this.timestamp = timestamp;
>   }
>   @Override
>   public boolean equals(Object o) {
>   if (this == o) {
>   return true;
>   }
>   if (o == null || getClass() != o.getClass()) {
>   return false;
>   }
>   JobExceptionsInfo.ExecutionExceptionInfo that = 
> (JobExceptionsInfo.ExecutionExceptionInfo) o;
>   return timestamp == that.timestamp &&
>   Objects.equals(exception, that.exception) &&
>   Objects.equals(task, that.task) &&
>   Objects.equals(location, that.location);
>   }
>   @Override
>   public int hashCode() {
>   return Objects.hash(timestamp, exception, task, 
> location);
>   }
> {code}
> I found jobexceptionsinfo.executionexceptioninfo has no getter method for the 
> field, is it missing?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-17595) JobExceptionsInfo. ExecutionExceptionInfo miss getter method

2020-05-11 Thread Chesnay Schepler (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-17595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17104139#comment-17104139
 ] 

Chesnay Schepler commented on FLINK-17595:
--

So far there was no requirement for a getter. They are mapped to JSON and this 
works without them.

> JobExceptionsInfo. ExecutionExceptionInfo miss getter method
> 
>
> Key: FLINK-17595
> URL: https://issues.apache.org/jira/browse/FLINK-17595
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / REST
>Affects Versions: 1.10.0
>Reporter: Wei Zhang
>Priority: Minor
> Fix For: 1.11.0
>
>
> {code:java}
>   public static final class ExecutionExceptionInfo {
>   public static final String FIELD_NAME_EXCEPTION = "exception";
>   public static final String FIELD_NAME_TASK = "task";
>   public static final String FIELD_NAME_LOCATION = "location";
>   public static final String FIELD_NAME_TIMESTAMP = "timestamp";
>   @JsonProperty(FIELD_NAME_EXCEPTION)
>   private final String exception;
>   @JsonProperty(FIELD_NAME_TASK)
>   private final String task;
>   @JsonProperty(FIELD_NAME_LOCATION)
>   private final String location;
>   @JsonProperty(FIELD_NAME_TIMESTAMP)
>   private final long timestamp;
>   @JsonCreator
>   public ExecutionExceptionInfo(
>   @JsonProperty(FIELD_NAME_EXCEPTION) String exception,
>   @JsonProperty(FIELD_NAME_TASK) String task,
>   @JsonProperty(FIELD_NAME_LOCATION) String location,
>   @JsonProperty(FIELD_NAME_TIMESTAMP) long timestamp) {
>   this.exception = Preconditions.checkNotNull(exception);
>   this.task = Preconditions.checkNotNull(task);
>   this.location = Preconditions.checkNotNull(location);
>   this.timestamp = timestamp;
>   }
>   @Override
>   public boolean equals(Object o) {
>   if (this == o) {
>   return true;
>   }
>   if (o == null || getClass() != o.getClass()) {
>   return false;
>   }
>   JobExceptionsInfo.ExecutionExceptionInfo that = 
> (JobExceptionsInfo.ExecutionExceptionInfo) o;
>   return timestamp == that.timestamp &&
>   Objects.equals(exception, that.exception) &&
>   Objects.equals(task, that.task) &&
>   Objects.equals(location, that.location);
>   }
>   @Override
>   public int hashCode() {
>   return Objects.hash(timestamp, exception, task, 
> location);
>   }
> {code}
> I found jobexceptionsinfo.executionexceptioninfo has no getter method for the 
> field, is it missing?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-17595) JobExceptionsInfo. ExecutionExceptionInfo miss getter method

2020-05-09 Thread Wei Zhang (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-17595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17103213#comment-17103213
 ] 

Wei Zhang commented on FLINK-17595:
---

If it is, I can fix it:D

> JobExceptionsInfo. ExecutionExceptionInfo miss getter method
> 
>
> Key: FLINK-17595
> URL: https://issues.apache.org/jira/browse/FLINK-17595
> Project: Flink
>  Issue Type: Bug
>  Components: Runtime / REST
>Affects Versions: 1.10.0
>Reporter: Wei Zhang
>Priority: Minor
> Fix For: 1.11.0
>
>
> {code:java}
>   public static final class ExecutionExceptionInfo {
>   public static final String FIELD_NAME_EXCEPTION = "exception";
>   public static final String FIELD_NAME_TASK = "task";
>   public static final String FIELD_NAME_LOCATION = "location";
>   public static final String FIELD_NAME_TIMESTAMP = "timestamp";
>   @JsonProperty(FIELD_NAME_EXCEPTION)
>   private final String exception;
>   @JsonProperty(FIELD_NAME_TASK)
>   private final String task;
>   @JsonProperty(FIELD_NAME_LOCATION)
>   private final String location;
>   @JsonProperty(FIELD_NAME_TIMESTAMP)
>   private final long timestamp;
>   @JsonCreator
>   public ExecutionExceptionInfo(
>   @JsonProperty(FIELD_NAME_EXCEPTION) String exception,
>   @JsonProperty(FIELD_NAME_TASK) String task,
>   @JsonProperty(FIELD_NAME_LOCATION) String location,
>   @JsonProperty(FIELD_NAME_TIMESTAMP) long timestamp) {
>   this.exception = Preconditions.checkNotNull(exception);
>   this.task = Preconditions.checkNotNull(task);
>   this.location = Preconditions.checkNotNull(location);
>   this.timestamp = timestamp;
>   }
>   @Override
>   public boolean equals(Object o) {
>   if (this == o) {
>   return true;
>   }
>   if (o == null || getClass() != o.getClass()) {
>   return false;
>   }
>   JobExceptionsInfo.ExecutionExceptionInfo that = 
> (JobExceptionsInfo.ExecutionExceptionInfo) o;
>   return timestamp == that.timestamp &&
>   Objects.equals(exception, that.exception) &&
>   Objects.equals(task, that.task) &&
>   Objects.equals(location, that.location);
>   }
>   @Override
>   public int hashCode() {
>   return Objects.hash(timestamp, exception, task, 
> location);
>   }
> {code}
> I found jobexceptionsinfo.executionexceptioninfo has no getter method for the 
> field, is it missing?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)