Package com.sap.hadoop.windowing

Examples of com.sap.hadoop.windowing.WindowingException


    PartitionDef tPart = tWindow == null ? null : tWindow.getPartDef();
    PartitionDef fPart = fWindow == null ? null : fWindow.getPartDef();
   
    if ( !TranslateUtils.isCompatible(tPart, fPart))
    {
      throw new WindowingException(
          sprintf("Window Function '%s' has an incompatible partition clause", wFnDef.getSpec()));
    }
   
    OrderDef tOrder = tWindow == null ? null : tWindow.getOrderDef();
    OrderDef fOrder = fWindow == null ? null : fWindow.getOrderDef();
    if ( !TranslateUtils.isCompatible(tOrder, fOrder))
    {
      throw new WindowingException(
          sprintf("Window Function '%s' has an incompatible order clause", wFnDef.getSpec()));
    }
  }
View Full Code Here


      Constructor<? extends ByteBasedList> cons = cls.getConstructor(Integer.TYPE);
      return cons.newInstance(capacity);
    }
    catch(Exception e)
    {
      throw new WindowingException(e);
    }
  }
View Full Code Here

          .genExprNode(expr, typeCheckCtx);
      return (ExprNodeDesc) map.get(expr);
    }
    catch (SemanticException se)
    {
      throw new WindowingException(se);
    }
  }
View Full Code Here

    {
      OI = exprEval.initialize(iInfo.getOI());
    }
    catch (HiveException he)
    {
      throw new WindowingException(he);
    }

    /*
     * if there are any LeadLag functions in this Expression Tree: - setup a
     * duplicate Evaluator for the 1st arg of the LLFuncDesc - initialize it
     * using the InputInfo provided for this Expr tree - set the duplicate
     * evaluator on the LLUDF instance.
     */
    LeadLagInfo llInfo = qDef.getTranslationInfo().getLLInfo();
    List<ExprNodeGenericFuncDesc> llFuncExprs = llInfo
        .getLLFuncExprsInTopExpr(exprNode);
    if (llFuncExprs != null)
    {
      for (ExprNodeGenericFuncDesc llFuncExpr : llFuncExprs)
      {
        ExprNodeDesc firstArg = llFuncExpr.getChildren().get(0);
        ExprNodeEvaluator dupExprEval = WindowingExprNodeEvaluatorFactory
            .get(qDef.getTranslationInfo(), firstArg);
        try
        {
          dupExprEval.initialize(iInfo.getOI());
        }
        catch (HiveException he)
        {
          throw new WindowingException(he);
        }
        GenericUDFLeadLag llFn = (GenericUDFLeadLag) llFuncExpr
            .getGenericUDF();
        llFn.setExprEvaluator(dupExprEval);
      }
View Full Code Here

      serDe.initialize(cfg, p);
      return serDe;
    }
    catch (SerDeException se)
    {
      throw new WindowingException(se);
    }
  }
View Full Code Here

  public static void validateComparable(ObjectInspector OI, String errMsg)
      throws WindowingException
  {
    if (!ObjectInspectorUtils.compareSupported(OI))
    {
      throw new WindowingException(errMsg);
    }
  }
View Full Code Here

    {
      hiveMetaTable = db.getTable(dbName, tableName);
    }
    catch (Throwable e)
    {
      throw new WindowingException(e);
    }
    return hiveMetaTable;
  }
View Full Code Here

    {
      tDef.setOI((StructObjectInspector) serde.getObjectInspector());
    }
    catch (SerDeException se)
    {
      throw new WindowingException(se);
    }

    if (tEval.isTransformsRawInput())
    {
      if (tDef.getName().equals(FunctionRegistry.NOOP_MAP_TABLE_FUNCTION))
      {
        serde = inputDef.getSerde();
      }
      else
      {
        serde = TranslateUtils.createLazyBinarySerDe(
            tInfo.getHiveCfg(), tEval.getRawInputOI());
      }
      try
      {
        tDef.setMapOI((StructObjectInspector) serde
            .getObjectInspector());
      }
      catch (SerDeException se)
      {
        throw new WindowingException(se);
      }
    }

  }
View Full Code Here

      return IOUtils.toString(is);

    }
    catch(Exception e)
    {
      throw new WindowingException(e);
    }
    finally
    {
      if ( is != null )
      {
View Full Code Here

      {
        val = symbolExprEval.evaluate(row);
      }
      catch(HiveException he)
      {
        throw new WindowingException(he);
      }
      val = converter.convert(val);
      result.matches = ((Boolean) val).booleanValue();
      result.nextRow = pItr.getIndex();
     
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.