Class TracingTimingMethodInterceptor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CORTEX_OUTPUT_FILENAME_OPTION
      Key in Cortex config options for specifying the filename the call durations should be written too.
      static java.lang.String GUICE_ENHANCED  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)  
      void postIntercept​(java.util.Map<java.lang.String,​java.lang.String> cortexSessionOptions)
      Saves the captured method timings to an output file based on the given session option.
      java.util.Map<java.lang.String,​java.lang.String> suggestedOptions​(java.lang.String value)
      Suggests default options for the interceptor.
      void writeFile​(java.lang.String file)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CORTEX_OUTPUT_FILENAME_OPTION

        public static final java.lang.String CORTEX_OUTPUT_FILENAME_OPTION
        Key in Cortex config options for specifying the filename the call durations should be written too.
        See Also:
        Constant Field Values
    • Constructor Detail

      • TracingTimingMethodInterceptor

        public TracingTimingMethodInterceptor()
    • Method Detail

      • invoke

        public java.lang.Object invoke​(org.aopalliance.intercept.MethodInvocation invocation)
                                throws java.lang.Throwable
        Specified by:
        invoke in interface org.aopalliance.intercept.MethodInterceptor
        Throws:
        java.lang.Throwable
      • suggestedOptions

        public java.util.Map<java.lang.String,​java.lang.String> suggestedOptions​(java.lang.String value)
        Description copied from interface: CortexInterceptor
        Suggests default options for the interceptor.
        Specified by:
        suggestedOptions in interface CortexInterceptor
        Parameters:
        value - context dependent value for customization
        Returns:
        suggested default options
      • postIntercept

        public void postIntercept​(java.util.Map<java.lang.String,​java.lang.String> cortexSessionOptions)
        Saves the captured method timings to an output file based on the given session option. If "spark.cortex.test.intercept.timing.outfile" is not present in session options then an IllegalArgumentException.
        Specified by:
        postIntercept in interface CortexInterceptor
        Parameters:
        cortexSessionOptions - Configuration options from the CortexSession
      • writeFile

        public void writeFile​(java.lang.String file)
                       throws java.io.IOException
        Throws:
        java.io.IOException