Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: FileSystem is not closed #255

Closed
1 task done
haohao0103 opened this issue Oct 18, 2023 · 1 comment
Closed
1 task done

[Bug]: FileSystem is not closed #255

haohao0103 opened this issue Oct 18, 2023 · 1 comment

Comments

@haohao0103
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

com.alibaba.graphar.util.FileSystem.scala
def writeValue(..){}
After close output, we do not close fs.

Expected Behavior

def writeValue(
value: Long,
outputPath: String,
hadoopConfig: Configuration
): Unit = {
val path = new Path(outputPath)
val fs = path.getFileSystem(hadoopConfig)
val output: FSDataOutputStream = fs.create(path, true) // create or overwrite
// consistent with c++ library, convert to little-endian
output.writeLong(java.lang.Long.reverseBytes(value))
output.close()
fs.close()
}

Minimal Reproducible Example

com.alibaba.graphar.util.FileSystem.scala
def writeValue(..){}
After close output, we do not close fs.

Environment

  • Operating system:mac
  • GraphAr version:main

Link to GraphAr Logs

No response

Further Information

No response

haohao0103 pushed a commit to haohao0103/GraphAr that referenced this issue Oct 20, 2023
close the FileSystem Object
haohao0103 added a commit to haohao0103/GraphAr that referenced this issue Oct 23, 2023
close the FileSystem Object
haohao0103 added a commit to haohao0103/GraphAr that referenced this issue Oct 23, 2023
close the FileSystem Object
@lixueclaire
Copy link
Contributor

resolved by #258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants