You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by richard zhou <ri...@intel.com> on 2015/03/18 09:14:50 UTC

Review Request 32195: SQOOP-2226: Add "Access Denied" in ShowLinkFunction.java

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32195/
-----------------------------------------------------------

Review request for Sqoop.


Repository: sqoop-sqoop2


Description
-------

When run "show link" in CLI, the connector name displays in the summary page.
+----+-------+--------------+------------------------+---------+
| Id | Name  | Connector Id |     Connector Name     | Enabled |
+----+-------+--------------+------------------------+---------+
| 1  | mysql | 4            | generic-jdbc-connector | true    |
| 2  | kafka | 1            | kite-connector         | true    |
+----+-------+--------------+------------------------+---------+
If user has privilege of READ LINK, and has not privilege of READ CONNECOTR, then SqoopException will be thrown.
After this JIRA, the result will be showed below.
+----+-------+--------------+------------------------+---------+
| Id | Name  | Connector Id |     Connector Name     | Enabled |
+----+-------+--------------+------------------------+---------+
| 1  | mysql | 4            | generic-jdbc-connector | true    |
| 2  | kafka | 1            | Access Denied          | true    |
+----+-------+--------------+------------------------+---------+


Diffs
-----

  shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java 1a5f354603108ba024ed3e66bb49af1e2590a5fe 

Diff: https://reviews.apache.org/r/32195/diff/


Testing
-------

manual


Thanks,

richard zhou


Re: Review Request 32195: SQOOP-2226: Add "Access Denied" in ShowLinkFunction.java

Posted by Abraham Elmahrek <ab...@cloudera.com>.

> On March 19, 2015, 1:37 a.m., Abraham Elmahrek wrote:
> > shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java, line 149
> > <https://reviews.apache.org/r/32195/diff/1/?file=898822#file898822line149>
> >
> >     This clobbers all exceptions. Is there a Auth specific exception we can catch? If not, I'd say let's add one that extends SqoopException.

We can also check the SqoopException and re-raise if it's something else.


- Abraham


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32195/#review76995
-----------------------------------------------------------


On March 18, 2015, 8:14 a.m., richard zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32195/
> -----------------------------------------------------------
> 
> (Updated March 18, 2015, 8:14 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> When run "show link" in CLI, the connector name displays in the summary page.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | kite-connector         | true    |
> +----+-------+--------------+------------------------+---------+
> If user has privilege of READ LINK, and has not privilege of READ CONNECOTR, then SqoopException will be thrown.
> After this JIRA, the result will be showed below.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | Access Denied          | true    |
> +----+-------+--------------+------------------------+---------+
> 
> 
> Diffs
> -----
> 
>   shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java 1a5f354603108ba024ed3e66bb49af1e2590a5fe 
> 
> Diff: https://reviews.apache.org/r/32195/diff/
> 
> 
> Testing
> -------
> 
> manual
> 
> 
> Thanks,
> 
> richard zhou
> 
>


Re: Review Request 32195: SQOOP-2226: Add "Access Denied" in ShowLinkFunction.java

Posted by richard zhou <ri...@intel.com>.

> On March 19, 2015, 1:37 a.m., Abraham Elmahrek wrote:
> > shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java, line 149
> > <https://reviews.apache.org/r/32195/diff/1/?file=898822#file898822line149>
> >
> >     This clobbers all exceptions. Is there a Auth specific exception we can catch? If not, I'd say let's add one that extends SqoopException.
> 
> Abraham Elmahrek wrote:
>     We can also check the SqoopException and re-raise if it's something else.
> 
> Abraham Elmahrek wrote:
>     Ok so I dug into this quite a bit more and I think this is fine for now. We just need to define the client/server communication for authorization failures instead of using SqoopException as a checked exception of sorts.
> 
> Abraham Elmahrek wrote:
>     Richard, could you provide a Jira for this?

Actually, SQOOP-2266 is created to address this communication issue. We could commit this patch now and work for a good solution in SQOOP-2266.


- richard


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32195/#review76995
-----------------------------------------------------------


On March 18, 2015, 8:14 a.m., richard zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32195/
> -----------------------------------------------------------
> 
> (Updated March 18, 2015, 8:14 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> When run "show link" in CLI, the connector name displays in the summary page.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | kite-connector         | true    |
> +----+-------+--------------+------------------------+---------+
> If user has privilege of READ LINK, and has not privilege of READ CONNECOTR, then SqoopException will be thrown.
> After this JIRA, the result will be showed below.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | Access Denied          | true    |
> +----+-------+--------------+------------------------+---------+
> 
> 
> Diffs
> -----
> 
>   shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java 1a5f354603108ba024ed3e66bb49af1e2590a5fe 
> 
> Diff: https://reviews.apache.org/r/32195/diff/
> 
> 
> Testing
> -------
> 
> manual
> 
> 
> Thanks,
> 
> richard zhou
> 
>


Re: Review Request 32195: SQOOP-2226: Add "Access Denied" in ShowLinkFunction.java

Posted by Abraham Elmahrek <ab...@cloudera.com>.

> On March 19, 2015, 1:37 a.m., Abraham Elmahrek wrote:
> > shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java, line 149
> > <https://reviews.apache.org/r/32195/diff/1/?file=898822#file898822line149>
> >
> >     This clobbers all exceptions. Is there a Auth specific exception we can catch? If not, I'd say let's add one that extends SqoopException.
> 
> Abraham Elmahrek wrote:
>     We can also check the SqoopException and re-raise if it's something else.
> 
> Abraham Elmahrek wrote:
>     Ok so I dug into this quite a bit more and I think this is fine for now. We just need to define the client/server communication for authorization failures instead of using SqoopException as a checked exception of sorts.

Richard, could you provide a Jira for this?


- Abraham


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32195/#review76995
-----------------------------------------------------------


On March 18, 2015, 8:14 a.m., richard zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32195/
> -----------------------------------------------------------
> 
> (Updated March 18, 2015, 8:14 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> When run "show link" in CLI, the connector name displays in the summary page.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | kite-connector         | true    |
> +----+-------+--------------+------------------------+---------+
> If user has privilege of READ LINK, and has not privilege of READ CONNECOTR, then SqoopException will be thrown.
> After this JIRA, the result will be showed below.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | Access Denied          | true    |
> +----+-------+--------------+------------------------+---------+
> 
> 
> Diffs
> -----
> 
>   shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java 1a5f354603108ba024ed3e66bb49af1e2590a5fe 
> 
> Diff: https://reviews.apache.org/r/32195/diff/
> 
> 
> Testing
> -------
> 
> manual
> 
> 
> Thanks,
> 
> richard zhou
> 
>


Re: Review Request 32195: SQOOP-2226: Add "Access Denied" in ShowLinkFunction.java

Posted by Abraham Elmahrek <ab...@cloudera.com>.

> On March 19, 2015, 1:37 a.m., Abraham Elmahrek wrote:
> > shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java, line 149
> > <https://reviews.apache.org/r/32195/diff/1/?file=898822#file898822line149>
> >
> >     This clobbers all exceptions. Is there a Auth specific exception we can catch? If not, I'd say let's add one that extends SqoopException.
> 
> Abraham Elmahrek wrote:
>     We can also check the SqoopException and re-raise if it's something else.

Ok so I dug into this quite a bit more and I think this is fine for now. We just need to define the client/server communication for authorization failures instead of using SqoopException as a checked exception of sorts.


- Abraham


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32195/#review76995
-----------------------------------------------------------


On March 18, 2015, 8:14 a.m., richard zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32195/
> -----------------------------------------------------------
> 
> (Updated March 18, 2015, 8:14 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> When run "show link" in CLI, the connector name displays in the summary page.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | kite-connector         | true    |
> +----+-------+--------------+------------------------+---------+
> If user has privilege of READ LINK, and has not privilege of READ CONNECOTR, then SqoopException will be thrown.
> After this JIRA, the result will be showed below.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | Access Denied          | true    |
> +----+-------+--------------+------------------------+---------+
> 
> 
> Diffs
> -----
> 
>   shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java 1a5f354603108ba024ed3e66bb49af1e2590a5fe 
> 
> Diff: https://reviews.apache.org/r/32195/diff/
> 
> 
> Testing
> -------
> 
> manual
> 
> 
> Thanks,
> 
> richard zhou
> 
>


Re: Review Request 32195: SQOOP-2226: Add "Access Denied" in ShowLinkFunction.java

Posted by Abraham Elmahrek <ab...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32195/#review76995
-----------------------------------------------------------



shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java
<https://reviews.apache.org/r/32195/#comment124747>

    This clobbers all exceptions. Is there a Auth specific exception we can catch? If not, I'd say let's add one that extends SqoopException.


- Abraham Elmahrek


On March 18, 2015, 8:14 a.m., richard zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32195/
> -----------------------------------------------------------
> 
> (Updated March 18, 2015, 8:14 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> When run "show link" in CLI, the connector name displays in the summary page.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | kite-connector         | true    |
> +----+-------+--------------+------------------------+---------+
> If user has privilege of READ LINK, and has not privilege of READ CONNECOTR, then SqoopException will be thrown.
> After this JIRA, the result will be showed below.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | Access Denied          | true    |
> +----+-------+--------------+------------------------+---------+
> 
> 
> Diffs
> -----
> 
>   shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java 1a5f354603108ba024ed3e66bb49af1e2590a5fe 
> 
> Diff: https://reviews.apache.org/r/32195/diff/
> 
> 
> Testing
> -------
> 
> manual
> 
> 
> Thanks,
> 
> richard zhou
> 
>


Re: Review Request 32195: SQOOP-2226: Add "Access Denied" in ShowLinkFunction.java

Posted by Abraham Elmahrek <ab...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/32195/#review77839
-----------------------------------------------------------

Ship it!


Ship It!

- Abraham Elmahrek


On March 18, 2015, 8:14 a.m., richard zhou wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32195/
> -----------------------------------------------------------
> 
> (Updated March 18, 2015, 8:14 a.m.)
> 
> 
> Review request for Sqoop.
> 
> 
> Repository: sqoop-sqoop2
> 
> 
> Description
> -------
> 
> When run "show link" in CLI, the connector name displays in the summary page.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | kite-connector         | true    |
> +----+-------+--------------+------------------------+---------+
> If user has privilege of READ LINK, and has not privilege of READ CONNECOTR, then SqoopException will be thrown.
> After this JIRA, the result will be showed below.
> +----+-------+--------------+------------------------+---------+
> | Id | Name  | Connector Id |     Connector Name     | Enabled |
> +----+-------+--------------+------------------------+---------+
> | 1  | mysql | 4            | generic-jdbc-connector | true    |
> | 2  | kafka | 1            | Access Denied          | true    |
> +----+-------+--------------+------------------------+---------+
> 
> 
> Diffs
> -----
> 
>   shell/src/main/java/org/apache/sqoop/shell/ShowLinkFunction.java 1a5f354603108ba024ed3e66bb49af1e2590a5fe 
> 
> Diff: https://reviews.apache.org/r/32195/diff/
> 
> 
> Testing
> -------
> 
> manual
> 
> 
> Thanks,
> 
> richard zhou
> 
>