This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Hadoop and the fly likes Mapr using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Hadoop
Bookmark "Mapr using java" Watch "Mapr using java" New topic

Mapr using java

bharath phatak

Joined: Jul 28, 2011
Posts: 7
Hi All,

I am new to Hadoop, Mapr and Pivotal. I have written java code to write into pivotal but facing issue while writing into Mapr.

public class HadoopFileSystemManager {

public void writeFile(String filePath,String data) throws IOException, URISyntaxException {
Path fPath = new Path(filePath);
String url = url = "hdfs://"+ip+":"+"8020";
FileSystem fs = FileSystem.get(new URI(url),new Configuration());
FSDataOutputStream writeStream = fs.create(fPath);


This code works fine with pivoatal but fails with Mapr.

For Mapr i am using port = 7222.
I am getting the following error
"An existing connection was forcibly closed by the remote host"

Please let me know if am using the right port or anything needs to be changed in the code specific to Mapr.

I have stopped the iptables.

Any info is much appreciated.

I agree. Here's the link:
subject: Mapr using java
It's not a secret anymore!