Examples of TasteException


Examples of org.apache.mahout.cf.taste.common.TasteException

        int secondComma = line.indexOf(',', firstComma + 1);
        float rating = Float.parseFloat(line.substring(firstComma + 1, secondComma));
        prefs.add(new GenericPreference(userID, itemID, rating));
      }
    } catch (IOException ioe) {
      throw new TasteException(ioe);
    }
    return new GenericItemPreferenceArray(prefs);
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

      log.debug("Executing SQL query: {}", getDiffSQL);
      rs = stmt.executeQuery();
      return rs.next() ? new FixedRunningAverage(rs.getInt(1), rs.getDouble(2)) : null;
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving diff", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
    }
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

        result[i] = new FixedRunningAverage(rs.getInt(1), rs.getDouble(2));
        i++;
      }
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving diff", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
    }
    return result;
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

        }
      }
      return null;
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving average item pref", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
    }
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

    public Vector get(IntWritable key) throws TasteException {
      Vector value;
      try {
        value = map.get(key, columnVector).get();
      } catch (IOException ioe) {
        throw new TasteException(ioe);
      }
      if (value == null) {
        return null;
      }
      columnVector = new VectorWritable();
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

     
      return new GenericUserPreferenceArray(prefs);
     
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving user", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
    }
   
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

     
      return result;
     
    } catch (SQLException sqle) {
      log.warn("Exception while exporting all data", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
     
    }
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

     
      return result;
     
    } catch (SQLException sqle) {
      log.warn("Exception while exporting all data", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
     
    }
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

     
      return result;
     
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving item s", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
    }
   
  }
View Full Code Here

Examples of org.apache.mahout.cf.taste.common.TasteException

      } else {
        return null;
      }
    } catch (SQLException sqle) {
      log.warn("Exception while retrieving prefs for item", sqle);
      throw new TasteException(sqle);
    } finally {
      IOUtils.quietClose(rs, stmt, conn);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.