steven zhang created HADOOP-17334: ------------------------------------- Summary: CosNInputStream should throw exception when filesystem is closed Key: HADOOP-17334 URL: https://issues.apache.org/jira/browse/HADOOP-17334 Project: Hadoop Common Issue Type: Improvement Components: fs, fs/cos Affects Versions: 3.3.0 Reporter: steven zhang
Thread hangs when other thread call filesystem.close(). log as below 971 [main] INFO org.apache.hadoop.fs.cosn.CosNFileSystem - Open the file: [cosn://bigdata-test 1075 [main] ERROR org.apache.hadoop.util.BlockingThreadPoolExecutorService - Could not submit task to executor java.util.concurrent.ThreadPoolExecutor the thread hangs reason is : # filesystem is cached when multiple thread using FileSystem#get method for creating instance # CosNInputStream#read method is not check CosNFileSystem is closed # CosNInputStream is using multiple thread(CosNFileReadTask) for read and main thread will await when readbuffer status is init # CosNFileSystem#close method will shutdown boundedIOThreadPool . so CosNInputStream#CosNFileReadTask will not notify main thread and cause thread hangs so CosNInputStream should throw exception when filesystem is closed -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-dev-h...@hadoop.apache.org