[
https://issues.apache.org/jira/browse/SQOOP-339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109231#comment-13109231
]
[email protected] commented on SQOOP-339:
-----------------------------------------------------
bq. On 2011-09-16 21:00:37, Arvind Prabhakar wrote:
bq. > Thanks for taking this up Joey. Considering the various platforms that
Sqoop is used on, it is likely that this change may cause some backward
compatibility issues for some. In order to avoid that, I would suggest
conditionally using the mkfifo based on environment setting or command line
option.
bq. >
bq. > Your thoughts?
bq.
bq. Joey Echeverria wrote:
bq. Any comments on the latest version?
bq.
bq. Arvind Prabhakar wrote:
bq. Sorry about the delay in responding Joey. I still have the same
concern that the default code-path has changed and it could cause regression on
systems where Sqoop otherwise has worked in the past. I would therefore suggest
that you default to the old way of doing things, and conditionally (implicit or
explicit), modify that behavior where necessary.
bq.
bq. Joey Echeverria wrote:
bq. So, I've got two ideas for how to restructure it to default to mknod:
bq.
bq. 1) Try using mknod in the static initializer to create a fifo in /tmp.
If it fails, use mkfifo from now on.
bq. 2) Always try using mknod in the create() method, and fall back to
mkfifo every time it fails.
bq.
bq. The one downside I see to 1 is it could falsely claim that mknod
doesn't work because of a, potentially temporary, environmental issue.
Preferences?
I think #2 would work best, with some log message indicating that the default
option has failed and trying a the mkfifo instead. Failure can be detected by
stating the fifo file to see if it exists.
While you are modifying that part of the code, it will also be good to log the
command output which is currently being ignored.
- Arvind
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1938/#review1944
-----------------------------------------------------------
On 2011-09-19 01:06:45, Joey Echeverria wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/1938/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2011-09-19 01:06:45)
bq.
bq.
bq. Review request for Sqoop.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. Replaced the use of mknod with mkfifo in NamedFifo to improve
compatibility with Mac OS X.
bq.
bq.
bq. This addresses bug SQOOP-339.
bq. https://issues.apache.org/jira/browse/SQOOP-339
bq.
bq.
bq. Diffs
bq. -----
bq.
bq. src/java/com/cloudera/sqoop/io/NamedFifo.java 38656cb
bq.
bq. Diff: https://reviews.apache.org/r/1938/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. No new tests as the functionality is covered by an existing unit test. I
ran the existing unit test and it worked. I don't have a Mac to test on right
now, so it might be good to run the unit tests on one before commit.
bq.
bq.
bq. Thanks,
bq.
bq. Joey
bq.
bq.
> Use of non-portable mknod utility causes build problems on Mac OS X
> -------------------------------------------------------------------
>
> Key: SQOOP-339
> URL: https://issues.apache.org/jira/browse/SQOOP-339
> Project: Sqoop
> Issue Type: Bug
> Affects Versions: 1.3.0, 1.4.0
> Reporter: Joseph Boyd
> Assignee: Joey Echeverria
> Priority: Minor
> Attachments: SQOOP-339-1.patch, SQOOP-339-2.patch, SQOOP-339-3.patch
>
>
> Duplicating this issue from SQOOP-175, which is in the cloudera JIRA
> From SQOOP-175's description by Ken Krugler :
> On Mac OS X 10.6.3, the TestNamedFifo.testNamedFifo() test fails. The error
> is caused by the Shell.execCommand() use of mknod, since (at least on my Mac)
> mknod doesn't know about the --mode=xxx parameter or the -p parameters.
> Based on
> http://stackoverflow.com/questions/4546356/is-mknod-portable-if-not-what-is-the-alternative,
> I switched the code to use mkfifo and it now passes all tests.
> The change to NamedFifo.create() is trivial:
> Shell.execCommand("mkfifo", "-m", "0" + modeStr, filename);
> But I have no way of trying this out on other OSes, so it might create a
> different compatibility issue.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira