[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-12 Thread xuanyuanking
Github user xuanyuanking commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232722383
  
--- Diff: dev/checkstyle.xml ---
@@ -64,6 +64,11 @@
 
 
 
+
+
--- End diff --

Thanks, done in 6e49bb8.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-12 Thread xuanyuanking
Github user xuanyuanking commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232722184
  
--- Diff: scalastyle-config.xml ---
@@ -240,6 +240,18 @@ This file is divided into 3 sections:
 ]]>
   
 
+  
--- End diff --

Thanks, new rule named `throwerror`.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-12 Thread xuanyuanking
Github user xuanyuanking commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232721829
  
--- Diff: dev/checkstyle.xml ---
@@ -64,6 +64,11 @@
 
 
 
+
+
+
--- End diff --

Thanks, rewrite this rule in 6e49bb8.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-12 Thread xuanyuanking
Github user xuanyuanking commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232721412
  
--- Diff: scalastyle-config.xml ---
@@ -240,6 +240,18 @@ This file is divided into 3 sections:
 ]]>
   
 
+  
+throw new 
OutOfMemoryError
+

[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-11 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232496215
  
--- Diff: scalastyle-config.xml ---
@@ -240,6 +240,18 @@ This file is divided into 3 sections:
 ]]>
   
 
+  
+throw new 
OutOfMemoryError
+

[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-11 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232493703
  
--- Diff: scalastyle-config.xml ---
@@ -240,6 +240,18 @@ This file is divided into 3 sections:
 ]]>
   
 
+  
+throw new 
OutOfMemoryError
+

[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-11 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232491342
  
--- Diff: dev/checkstyle.xml ---
@@ -64,6 +64,11 @@
 
 
 
+
+
--- End diff --

Per my suggestion below, how about the regex `throw new \\w+Error\\(`


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-11 Thread felixcheung
Github user felixcheung commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232477783
  
--- Diff: scalastyle-config.xml ---
@@ -240,6 +240,18 @@ This file is divided into 3 sections:
 ]]>
   
 
+  
+throw new 
OutOfMemoryError
+

[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-09 Thread HyukjinKwon
Github user HyukjinKwon commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232289280
  
--- Diff: scalastyle-config.xml ---
@@ -240,6 +240,18 @@ This file is divided into 3 sections:
 ]]>
   
 
+  
--- End diff --

not a big deal but I would name it `nothrowoutofmemory`


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-09 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232271235
  
--- Diff: dev/checkstyle.xml ---
@@ -64,6 +64,11 @@
 
 
 
+
+
+
--- End diff --

Just say that OutOfMemoryError should not generally be thrown by 
application code. It may not actually be replaceable by SparkOutOfMemoryError


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-09 Thread viirya
Github user viirya commented on a diff in the pull request:

https://github.com/apache/spark/pull/22989#discussion_r232245886
  
--- Diff: scalastyle-config.xml ---
@@ -240,6 +240,18 @@ This file is divided into 3 sections:
 ]]>
   
 
+  
+throw new 
OutOfMemoryError
+

[GitHub] spark pull request #22989: [SPARK-25986][Build] Banning throw new OutOfMemor...

2018-11-08 Thread xuanyuanking
GitHub user xuanyuanking opened a pull request:

https://github.com/apache/spark/pull/22989

[SPARK-25986][Build] Banning throw new OutOfMemoryErrors

## What changes were proposed in this pull request?

Add scala and java lint check rules to ban the usage of `throw new 
OutOfMemoryErrors` cause it will cause hole executor killed. See more details 
in https://github.com/apache/spark/pull/22969.

## How was this patch tested?

Local test with lint-scala and lint-java.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/xuanyuanking/spark SPARK-25986

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/22989.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #22989


commit d67875115f622082519b1dbcb1c1e34c2184b34f
Author: Yuanjian Li 
Date:   2018-11-09T05:23:01Z

banning throw new OutOfMemoryErrors




---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org