{-|
 Get the data locations for a file
  - throws an exception if path does not point at a regular file.
|-}
hdfsFileBlockLocations :: Config -> Path -> IO [Types.BlockLocation]
hdfsFileBlockLocations config path =
  forRegularFilePath config path $ \thriftPath fileSize ->
    withThriftChannelsForRead config (
      \channels -> C.getFileBlockLocations channels thriftPath 0 fileSize >>= return . toList)
hdfsFileBlockLocations :: Config -> Path -> IO [Types.BlockLocation]
hdfsFileBlockLocations config path =
  forRegularFilePath config path $ \thriftPath fileSize ->
    withThriftChannelsForRead config (
      \channels -> C.getFileBlockLocations channels thriftPath 0 fileSize >>= return . toList)
hdfsFileBlockLocations config path =
  forRegularFilePath config path $ \thriftPath fileSize ->
    withThriftChannelsForRead config (
      \channels -> C.getFileBlockLocations channels thriftPath 0 fileSize >>= return . toList)