ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sateesh Karuturi <sateesh.karutu...@gmail.com>
Subject Accessing igfs file through java
Date Tue, 04 Oct 2016 05:35:38 GMT
Hello experts,
I am new to the Apache Ignite , and i need to access igfs file through java.
Till now what i tried is :

import java.io.InputStream;

import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteFileSystem;
import org.apache.ignite.Ignition;
import org.apache.ignite.igfs.IgfsPath;

public class Ignite_Spark {

public static void main(String[] args) throws Exception {
Ignite ignite =
Ignition.start("/usr/local/hadoop/apache-ignite-hadoop-1.6.0-bin/config/default-config.xml");
Ignite ignites = Ignition.ignite();

IgniteFileSystem fs = ignites.fileSystem("igfs");

IgfsPath workDir = new IgfsPath("igfs://localhost:8020/ignite/fs");
fs.mkdirs(workDir);


IgfsPath filePath = new IgfsPath(workDir, "ttypes.csv");

try (InputStream in = fs.open(filePath)) {
in.read();
}
}

}


But getting  java.lang.IllegalArgumentException: Path should be absolute:
igfs://localhost:8020/ignite/fs exception.
anyone please help me out.
Thanks .

Mime
View raw message