Book Image

Learning Cascading

Book Image

Learning Cascading

Overview of this book

Table of Contents (18 chapters)
Learning Cascading
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
7
Optimizing the Performance of a Cascading Application
Index

Identifying common use cases for custom operations


While there are many useful built-in operations, there are several cases where writing a custom operation will be required. But let's look at our options first:

  • If you need a filter or function that performs a simple comparison or calculation on one or more fields, consider using the ExpressionFilter or ExpressionFunction built-ins. These classes are very flexible and allow one to write small custom pieces of Java code that will be interpreted and executed for you. In many cases, this will be sufficient and will obviate the need for you to create a custom operation.

    However, be aware that this type of functionality uses the Janino compiler. This is a moderately large footprint "mini-Java" compiler (if not in total size, it will grow large with any sort of sophisticated code to compile). It takes as input a string that contains a Java program, compiles it to bytecode, binds input and output variables to it, and then executes it.

  • A second scenario...