コード例 #1
0
 def test_cython_count_window_coder(self):
     fast_coder = coder_impl_fast.CountWindowCoderImpl()
     slow_coder = coder_impl.CountWindowCoderImpl()
     window = CountWindow(100)
     self.assertEqual(fast_coder.encode_nested(window),
                      slow_coder.encode_nested(window))
コード例 #2
0
 def get_impl(self):
     return coder_impl.CountWindowCoderImpl()
コード例 #3
0
 def _get_coder(self):
     try:
         from pyflink.fn_execution import coder_impl_fast as coder_impl
     except:
         from pyflink.fn_execution.beam import beam_coder_impl_slow as coder_impl
     return coder_impl.CountWindowCoderImpl()