<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Hi all<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">I&#39;m new to GlusterFS so please forgive me if I&#39;m using wrong mailing list or this questions has been already answered in the past.<br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">I have setup GlusterFS ( server and client ) to an Ubuntu instance and now I&#39;m trying to use the<a href="https://github.com/semiosis/glusterfs-java-filesystem" target="_blank"> Java library </a>to read and write files.<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">The Example.java works pretty fine but when I try to write a big file ( actually after some tests I realized that &quot;big file&quot; = &gt; 8k ) I get the following exception<br><br><span style="font-family:monospace,monospace">Exception in thread &quot;main&quot; java.lang.IllegalArgumentException<br>    at java.nio.Buffer.position(Buffer.java:244)<br>    at com.peircean.glusterfs.GlusterFileChannel.write(GlusterFileChannel.java:175)<br>    at java.nio.channels.Channels.writeFullyImpl(Channels.java:78)<br>    at java.nio.channels.Channels.writeFully(Channels.java:101)<br>    at java.nio.channels.Channels.access$000(Channels.java:61)<br>    at java.nio.channels.Channels$1.write(Channels.java:174)<br>    at java.nio.file.Files.write(Files.java:3297)<br>    at com.peircean.glusterfs.example.Example.main(Example.java:82)<br clear="all"></span></div><br><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">​Which is caused because the bytes written are more than the buffer limit ( 8192 ) . However the file is correctly written in Gluster. <br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">So here&#39;s ​my questions:<br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">1. Is there any known issue in java lib?<br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">2. Should I use another way of writing &quot;big&quot; files?<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">BTW, trying to write the same file using the relative path of Gluster&#39;s mounted volume is working without any issues.<br><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;font-size:small">Thanks for your response.<br></div><br><br>-- <br><div><div dir="ltr"><span style="font-family:trebuchet ms,sans-serif"><font size="2">Patroklos Papapetrou | Chief Software Architect<br><div><div>s: ppapapetrou</div></div></font></span></div></div>
</div>