[
https://issues.apache.org/jira/browse/IGNITE-4862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15994991#comment-15994991
]
Ivan Veselovsky edited comment on IGNITE-4862 at 5/3/17 2:39 PM:
-----------------------------------------------------------------
I prepared another version of the fix (pull request
https://github.com/apache/ignite/pull/1901) that leaves the 2 problematic
classes almost unsynchronized, but adds {{ synchronized (mux) {} }} if needed
to use them in concurrent context.
This fix also proven to work and looks simple, but for me it looks less
preferable, because it does not make good encapsulation and responsibility
separation, so I would recommend to use 1st version of the fix. The {{
LazyValue }} class is just generic purpose utility class , that is to be placed
in utilities. Other than that , the change is small , and , what is more
important, it makes the logic very clear.
was (Author: iveselovskiy):
I prepared another version of the fix (pull request 1901) that leaves the 2
problematic classes unsynchronized, but adds {{ synchronized (mux) {} }} if
needed to use them in concurrent context.
This fix also proven to work and looks simple, but for me it looks less
preferable, because it does not make good encapsulation and responsibility
separation, so I would recommend to use 1st version of the fix. The {{
LazyValue }} class is just generic purpose utility class , that is to be placed
in utilities. Other than that , the change is small , and , what is more
important, very clear.
> NPE in reading data from IGFS
> -----------------------------
>
> Key: IGNITE-4862
> URL: https://issues.apache.org/jira/browse/IGNITE-4862
> Project: Ignite
> Issue Type: Bug
> Components: hadoop
> Affects Versions: 1.9
> Reporter: Dmitry Karachentsev
> Assignee: Ivan Veselovsky
> Priority: Minor
> Fix For: 2.1
>
>
> {noformat}
> D:\app\CodexRT.CodexRT_20170314-1>hadoop\bin\hadoop fs -copyToLocal
> igfs:///cacheLink/test3.orc D:\test3.orc
> -copyToLocal: Fatal internal error
> java.lang.NullPointerException
> at
> org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsInputStream$FetchBufferPart.flatten(HadoopIgfsInputStream.java:458)
> at
> org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsInputStream$DoubleFetchBuffer.flatten(HadoopIgfsInputStream.java:511)
> at
> org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsInputStream.read(HadoopIgfsInputStream.java:177)
> at java.io.DataInputStream.read(DataInputStream.java:100)
> at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:91)
> at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:59)
> at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:119)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination$TargetFileSystem.writeStreamToFile(CommandWithDestination.java:466)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.copyStreamToTarget(CommandWithDestination.java:391)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.copyFileToTarget(CommandWithDestination.java:328)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.processPath(CommandWithDestination.java:263)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.processPath(CommandWithDestination.java:248)
> at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:317)
> at
> org.apache.hadoop.fs.shell.Command.processPathArgument(Command.java:289)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.processPathArgument(CommandWithDestination.java:243)
> at
> org.apache.hadoop.fs.shell.Command.processArgument(Command.java:271)
> at
> org.apache.hadoop.fs.shell.Command.processArguments(Command.java:255)
> at
> org.apache.hadoop.fs.shell.CommandWithDestination.processArguments(CommandWithDestination.java:220)
> at
> org.apache.hadoop.fs.shell.Command.processRawArguments(Command.java:201)
> at org.apache.hadoop.fs.shell.Command.run(Command.java:165)
> at org.apache.hadoop.fs.FsShell.run(FsShell.java:287)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
> at org.apache.hadoop.fs.FsShell.main(FsShell.java:340)
> {noformat}
> Details in discussion:
> [http://apache-ignite-users.70518.x6.nabble.com/NullPointerException-when-using-IGFS-td11328.html]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)