Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-4695

Stream delete does not work on Windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.1, 3.3.3
    • Fix Version/s: None
    • Component/s: Standalone, Streams, Test
    • Labels:
    • Release Notes:
      Fixes an issue in Windows SDK where streams could not be deleted.
    • Rank:
      1|hzz5h3:

      Description

      On Windows SDK, create a stream and ingest events into the stream.
      Then, try to delete the stream. It will fail, with a RuntimeException that is due to file permissions. It appears to appropriately created the '.deleted' directory, but no files appear in there.

      In case it matters, this is on Windows 8.1.

      2016-01-18 19:20:01,290 - ERROR [netty-executor-6:c.c.c.c.HttpExceptionHandler@59] - Unexpected error: request=DELETE /v3/namespaces/default/streams/purchaseStream user=<null>:
      java.lang.RuntimeException: java.nio.file.AccessDeniedException: data\namespaces\default\streams\purchaseStream -> data\namespaces\default\streams\.deleted\purchaseStream1453173601282
          at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[com.google.guava.guava-13.0.1.jar:na]
          at co.cask.cdap.data2.transaction.stream.FileStreamAdmin$7.run(FileStreamAdmin.java:500) ~[co.cask.cdap.cdap-data-fabric-3.3.0-SNAPSHOT.jar:na]
          at co.cask.cdap.data.stream.AbstractStreamCoordinatorClient.deleteStream(AbstractStreamCoordinatorClient.java:121) ~[co.cask.cdap.cdap-data-fabric-3.3.0-SNAPSHOT.jar:na]
          at co.cask.cdap.data2.transaction.stream.FileStreamAdmin.doDrop(FileStreamAdmin.java:467) ~[co.cask.cdap.cdap-data-fabric-3.3.0-SNAPSHOT.jar:na]
          at co.cask.cdap.data2.transaction.stream.FileStreamAdmin.drop(FileStreamAdmin.java:366) ~[co.cask.cdap.cdap-data-fabric-3.3.0-SNAPSHOT.jar:na]
          at co.cask.cdap.data.stream.service.StreamHandler.delete(StreamHandler.java:268) ~[co.cask.cdap.cdap-data-fabric-3.3.0-SNAPSHOT.jar:na]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_65]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_65]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_65]
          at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_65]
          at co.cask.http.HttpMethodInfo.invoke(HttpMethodInfo.java:80) ~[co.cask.http.netty-http-0.14.0.jar:na]
          at co.cask.http.HttpDispatcher.messageReceived(HttpDispatcher.java:38) [co.cask.http.netty-http-0.14.0.jar:na]
          at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [io.netty.netty-3.6.6.Final.jar:na]
          at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [io.netty.netty-3.6.6.Final.jar:na]
          at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [io.netty.netty-3.6.6.Final.jar:na]
          at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) [io.netty.netty-3.6.6.Final.jar:na]
          at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) [io.netty.netty-3.6.6.Final.jar:na]
          at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314) [io.netty.netty-3.6.6.Final.jar:na]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65]
          at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
      Caused by: java.nio.file.AccessDeniedException: data\namespaces\default\streams\purchaseStream -> data\namespaces\default\streams\.deleted\purchaseStream1453173601282
          at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) ~[na:1.8.0_65]
          at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) ~[na:1.8.0_65]
          at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:301) ~[na:1.8.0_65]
          at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287) ~[na:1.8.0_65]
          at java.nio.file.Files.move(Files.java:1395) ~[na:1.8.0_65]
          at co.cask.cdap.common.twill.LocalLocation.renameTo(LocalLocation.java:184) ~[co.cask.cdap.cdap-common-3.3.0-SNAPSHOT.jar:na]
          at co.cask.cdap.data2.transaction.stream.FileStreamAdmin$7.run(FileStreamAdmin.java:496) ~[co.cask.cdap.cdap-data-fabric-3.3.0-SNAPSHOT.jar:na]
          ... 19 common frames omitted
      

        Attachments

          Activity

            People

            • Assignee:
              andreas Andreas Neumann
              Reporter:
              ali.anwar Ali Anwar
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: