Package com.sap.hadoop.windowing

Examples of com.sap.hadoop.windowing.WindowingException


    {
      throw w;
    }
    catch(Exception e)
    {
      throw new WindowingException(e);
    }
  }
View Full Code Here


     
      return tIn;
    }
    catch(Exception e)
    {
      throw new WindowingException(e);
    }
  }
View Full Code Here

    {
      throw we;
    }
    catch (Exception e)
    {
      throw new WindowingException(e);
    }
  }
View Full Code Here

        pw.println(o);
      }
    }
    catch (SerDeException se)
    {
      throw new WindowingException(se);
    }
  }
View Full Code Here

      f.setAccessible(true);
      hiveConsole = (LogHelper) f.get(this); // IllegalAccessException
    }
    catch (Throwable t)
    {
      throw new WindowingException(
          "Failed to access conf and console members from HiveCliDriver",
          t);
    }

    // initialize windowing client
View Full Code Here

          whCond = whCondEval.evaluate(oRow);
          whCond = whConverter.convert(whCond);
        }
        catch (HiveException he)
        {
          throw new WindowingException(he);
        }
        if (whCond == null || !((Boolean) whCond).booleanValue())
        {
          continue;
        }
      }

      for (ColumnDef cDef : cols)
      {
        try
        {
          Object newCol = cDef.getExprEvaluator().evaluate(oRow);
          output[colCnt++] = newCol;
          selectList.add(newCol);
        }
        catch (HiveException he)
        {
          throw new WindowingException(he);
        }
      }
     
      //if the implementation of ForwardSink accepts an object,
      //forward it to the next operator in chain
      //else collect the writable key-value pairs for outstream
      if(rS.acceptObject()){
        rS.collectOutput(output);
      }else{
        try
        {
          value = oSerDe.serialize(selectList, selectOI);
        }
        catch (SerDeException se)
        {
          throw new WindowingException(se);
        }
        rS.collectOutput(NullWritable.get(), value);
      }
    }
  }
View Full Code Here

    {
      return tfInfo != null ? tfInfo.getFunctionResolver().newInstance() : null;
    }
    catch(Exception e)
    {
      throw new WindowingException(e);
    }
  }
View Full Code Here

      op.setConf(conf);
      OperatorFactory.makeChild(op, oplist);
    }
    catch (Exception e)
    {
      throw new WindowingException(e);
    }
    return (op);
  }
View Full Code Here

    Partition iPart = pItr.getPartition();
    StructObjectInspector inputOI;
    try {
      inputOI = (StructObjectInspector) iPart.getSerDe().getObjectInspector();
    } catch (SerDeException se) {
      throw new WindowingException(se);
    }
   
    try
    {
      for(WindowFunctionDef wFn : wFnDefs)
      {
        boolean processWindow = wFn.getWindow() != null;
        pItr.reset();
        if ( !processWindow )
        {
          GenericUDAFEvaluator fEval = wFn.getEvaluator();
          Object[] args = new Object[wFn.getArgs().size()];
          AggregationBuffer aggBuffer = fEval.getNewAggregationBuffer();
          while(pItr.hasNext())
          {
            Object row = pItr.next();
            int i =0;
            for(ArgDef arg : wFn.getArgs())
            {
              args[i++] = arg.getExprEvaluator().evaluate(row);
            }
            fEval.aggregate(aggBuffer, args);
          }
          Object out = fEval.evaluate(aggBuffer);
          WindowFunctionInfo wFnInfo = FunctionRegistry.getWindowFunctionInfo(wFn.getSpec().getName());
          if ( !wFnInfo.isPivotResult())
          {
            out = new SameList(iPart.size(), out);
          }
          oColumns.add((List<?>)out);
        }
        else
        {
          oColumns.add(executeFnwithWindow(getQueryDef(), wFn, iPart));
        }
      }
     
      for(int i=0; i < iPart.size(); i++)
      {
        ArrayList oRow = new ArrayList();
        Object iRow = iPart.getAt(i);
       
        for(StructField f : inputOI.getAllStructFieldRefs())
        {
          oRow.add(inputOI.getStructFieldData(iRow, f));
        }
       
        for(int j=0; j < oColumns.size(); j++)
        {
          oRow.add(oColumns.get(j).get(i));
        }
        outP.append(oRow);
      }
    }
    catch(HiveException he)
    {
      throw new WindowingException(he);
    }
   
  }
View Full Code Here

    {
      walk((ExprNodeNullDesc) e);
    }
    else
    {
      throw new WindowingException("Unknown Expr Type " + e.getClass().getName());
    }
  }
View Full Code Here

TOP

Related Classes of com.sap.hadoop.windowing.WindowingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.